Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove global styles #3554

Merged
merged 31 commits into from
Sep 19, 2024
Merged

chore: remove global styles #3554

merged 31 commits into from
Sep 19, 2024

Conversation

bashirkarimi
Copy link
Contributor

@bashirkarimi bashirkarimi commented Sep 17, 2024

Removed:

  • root
  • reboot
  • bootstrap/type
  • bootstrap/license

A separate ticket is created to fix the broken styles: https://github.com/orgs/swisspost/projects/3/views/12?pane=issue&itemId=80363901

@bashirkarimi bashirkarimi linked an issue Sep 17, 2024 that may be closed by this pull request
Copy link

changeset-bot bot commented Sep 17, 2024

🦋 Changeset detected

Latest commit: c8bd686

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 17 packages
Name Type
@swisspost/design-system-styles Patch
@swisspost/design-system-components-angular-workspace Patch
@swisspost/design-system-components Patch
@swisspost/design-system-demo Patch
@swisspost/design-system-documentation Patch
@swisspost/internet-header Patch
@swisspost/design-system-intranet-header-workspace Patch
@swisspost/design-system-nextjs-integration Patch
@swisspost/design-system-styles-primeng-workspace Patch
@swisspost/design-system-intranet-header Patch
@swisspost/design-system-styles-primeng Patch
@swisspost/design-system-components-react Patch
@swisspost/design-system-components-angular Patch
@swisspost/design-system-intranet-header-showcase Patch
@swisspost/design-system-tokens Patch
@swisspost/design-system-icons Patch
@swisspost/design-system-migrations Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@swisspost-bot
Copy link
Contributor

swisspost-bot commented Sep 17, 2024

Related Previews

@bashirkarimi bashirkarimi marked this pull request as ready for review September 17, 2024 13:09
@bashirkarimi bashirkarimi requested a review from a team as a code owner September 17, 2024 13:09
@bashirkarimi bashirkarimi marked this pull request as draft September 18, 2024 14:23
@bashirkarimi bashirkarimi marked this pull request as ready for review September 19, 2024 06:48
@@ -24,7 +24,7 @@ body {
}

.docs-story > :first-child {
font-family: var(--bs-body-font-family);
font-family: var(--post-core-font-family-frutiger);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should never use the core tokens somewhere!

Please use the --post-body-font-family here.
Maybe also use the tokens.get() function together with the $post-body map.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value of --post-body-font-family is Swiss Post Sans v005. Should we use Swiss Post Sans v005 or Frutiger Neue For Post?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have implemented your suggestion and will check the correct font-family in the https://github.com/orgs/swisspost/projects/3/views/17?pane=issue&itemId=78602494

Copy link
Contributor

@oliverschuerch oliverschuerch Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the token --post-body-font-family as is and rename the font name in the @font-face definition in the font.scss file to match the new name.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fonts.scss file should be adapted like this:

@forward './../variables/options';

@use './../variables/options';

@font-face {
  font-display: swap;
  font-family: 'Swiss Post Sans v005';
  font-weight: 900;
  src:
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-Blk.woff2') format('woff2'),
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-Blk.woff') format('woff');
}

@font-face {
  font-display: swap;
  font-family: 'Swiss Post Sans v005';
  font-weight: 900;
  font-style: italic;
  src:
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-BlkIt.woff2') format('woff2'),
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-BlkIt.woff') format('woff');
}

@font-face {
  font-display: swap;
  font-family: 'Swiss Post Sans v005';
  font-weight: 700;
  src:
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-Bold.woff2') format('woff2'),
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-Bold.woff') format('woff');
}

@font-face {
  font-display: swap;
  font-family: 'Swiss Post Sans v005';
  font-weight: 700;
  font-style: italic;
  src:
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-BdIt.woff2') format('woff2'),
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-BdIt.woff') format('woff');
}

@font-face {
  font-display: swap;
  font-family: 'Swiss Post Sans v005';
  font-weight: 400;
  src:
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-Rg.woff2') format('woff2'),
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-Rg.woff') format('woff');
}

@font-face {
  font-display: swap;
  font-family: 'Swiss Post Sans v005';
  font-weight: 400;
  font-style: italic;
  src:
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-It.woff2') format('woff2'),
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-It.woff') format('woff');
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fonts are renamed.

packages/styles/src/components/type.scss Outdated Show resolved Hide resolved
packages/styles/src/components/reboot.scss Show resolved Hide resolved
packages/styles/src/components/base.scss Outdated Show resolved Hide resolved
@oliverschuerch oliverschuerch self-requested a review September 19, 2024 12:27
Comment on lines 5 to 11
// fixes for color in buttons
@use './../mixins/color' as mx-color;
@use './../variables/animation';
@use './../variables/color';

body {
@include type.font-smoothing();
@include mx-color.colored-background(color.$white);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say we should remove this temporary button fix now, so we don't have to remember it later (when we implement the new button styles).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is removed.

@@ -24,7 +24,7 @@ body {
}

.docs-story > :first-child {
font-family: var(--bs-body-font-family);
font-family: var(--post-core-font-family-frutiger);
Copy link
Contributor

@oliverschuerch oliverschuerch Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the token --post-body-font-family as is and rename the font name in the @font-face definition in the font.scss file to match the new name.

@@ -24,7 +24,7 @@ body {
}

.docs-story > :first-child {
font-family: var(--bs-body-font-family);
font-family: var(--post-core-font-family-frutiger);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fonts.scss file should be adapted like this:

@forward './../variables/options';

@use './../variables/options';

@font-face {
  font-display: swap;
  font-family: 'Swiss Post Sans v005';
  font-weight: 900;
  src:
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-Blk.woff2') format('woff2'),
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-Blk.woff') format('woff');
}

@font-face {
  font-display: swap;
  font-family: 'Swiss Post Sans v005';
  font-weight: 900;
  font-style: italic;
  src:
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-BlkIt.woff2') format('woff2'),
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-BlkIt.woff') format('woff');
}

@font-face {
  font-display: swap;
  font-family: 'Swiss Post Sans v005';
  font-weight: 700;
  src:
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-Bold.woff2') format('woff2'),
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-Bold.woff') format('woff');
}

@font-face {
  font-display: swap;
  font-family: 'Swiss Post Sans v005';
  font-weight: 700;
  font-style: italic;
  src:
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-BdIt.woff2') format('woff2'),
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-BdIt.woff') format('woff');
}

@font-face {
  font-display: swap;
  font-family: 'Swiss Post Sans v005';
  font-weight: 400;
  src:
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-Rg.woff2') format('woff2'),
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-Rg.woff') format('woff');
}

@font-face {
  font-display: swap;
  font-family: 'Swiss Post Sans v005';
  font-weight: 400;
  font-style: italic;
  src:
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-It.woff2') format('woff2'),
    url('#{options.$font-base-path}/FrutigerNeueforPostW05-It.woff') format('woff');
}

Copy link

@bashirkarimi bashirkarimi merged commit 4b1d587 into main Sep 19, 2024
11 of 12 checks passed
@bashirkarimi bashirkarimi deleted the 3543-remove-global-styles branch September 19, 2024 14:58
gfellerph pushed a commit that referenced this pull request Oct 8, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @swisspost/[email protected]

### Major Changes

- Made the heading-level property required for the accordion and removed
it from the accordion-item docs. (by
[@schaertim](https://github.com/schaertim) with
[#3383](#3383))

### Patch Changes

- Fixed a bug in nested accordions where closing a child item
unintentionally closed all parent accordion elements. (by
[@schaertim](https://github.com/schaertim) with
[#3427](#3427))

- Fixed an issue related to conflicting pointer and focus events hiding
the tooltip unexpectedly in some situations. The tooltip now behaves as
expected in this situation. (by
[@alionazherdetska](https://github.com/alionazherdetska) with
[#3592](#3592))

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Major Changes

- Removed the following placeholders: `%list-adjustment`,
`%module-container`, `%default-module-spacer`, `%text-container`. (by
[@leagrdv](https://github.com/leagrdv) with
[#3623](#3623))

- Updated the margin, padding, and gap utility classes to use the pixel
values (1, 2, ... , 112) instead of size names (hair, line, ...,
bigger-giant). (by [@alizedebray](https://github.com/alizedebray) with
[#3557](#3557))

### Minor Changes

- Added Text Highlighted component. (by
[@bashirkarimi](https://github.com/bashirkarimi) with
[#3586](#3586))

- Added lead text component for introductory paragraphs. (by
[@bashirkarimi](https://github.com/bashirkarimi) with
[#3575](#3575))

### Patch Changes

- styles: Added reset styles (by
[@bashirkarimi](https://github.com/bashirkarimi) with
[#3545](#3545))

- Removed global styles (by
[@bashirkarimi](https://github.com/bashirkarimi) with
[#3554](#3554))

- Updated the style of headings (h1-h6). (by
[@bashirkarimi](https://github.com/bashirkarimi) with
[#3534](#3534))

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]



## @swisspost/[email protected]



## @swisspost/[email protected]

### Major Changes

- Made the heading-level property required for the accordion and removed
it from the accordion-item docs. (by
[@schaertim](https://github.com/schaertim) with
[#3383](#3383))

### Minor Changes

- Added a toolbar for switching the theme, channel, and mode of all
stories. (by [@alizedebray](https://github.com/alizedebray) with
[#3528](#3528))

- Added documentation outlining the mission statement of the Design
System. (by [@alionazherdetska](https://github.com/alionazherdetska)
with [#3568](#3568))

- Added Text Highlighted component. (by
[@bashirkarimi](https://github.com/bashirkarimi) with
[#3586](#3586))

- Updated the margin, padding, and gap utility classes to use the pixel
values (1, 2, ... , 112) instead of size names (hair, line, ...,
bigger-giant). (by [@alizedebray](https://github.com/alizedebray) with
[#3557](#3557))

- Added documentation for design principles. (by
[@alionazherdetska](https://github.com/alionazherdetska) with
[#3565](#3565))

- Added lead text component for introductory paragraphs. (by
[@bashirkarimi](https://github.com/bashirkarimi) with
[#3575](#3575))

### Patch Changes

- Updated the style of headings (h1-h6). (by
[@bashirkarimi](https://github.com/bashirkarimi) with
[#3534](#3534))

- Fixed typos in the Sass and HTML href paths. (by
[@schaertim](https://github.com/schaertim) with
[#3466](#3466))

-   Updated dependencies:
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove global styles
3 participants