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

Fix/indepented component styling #1029

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
7 changes: 7 additions & 0 deletions packages/components-css/src/accordion/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,10 @@
justify-content: center;
margin-block: var(--rhc-accordion-button-icon-margin-block);
}

.utrecht-accordion__panel {
font-family: var(--rhc-font-family-primary, inherit);
font-size: var(--rhc-font-size-xs-desktop, inherit);
font-weight: var(--rhc-font-weight-regular, inherit);
line-height: var(--rhc-line-height-md, inherit);
}
7 changes: 7 additions & 0 deletions packages/components-css/src/article/index.scss
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
// if needed add styles here for the Article components.

.utrecht-article {
font-family: var(--rhc-font-family-primary, inherit);
font-size: var(--rhc-font-size-xs-desktop, inherit);
font-weight: var(--rhc-font-weight-regular, inherit);
line-height: var(--rhc-line-height-md, inherit);
}
1 change: 1 addition & 0 deletions packages/components-css/src/blockquote/_mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
border-style: solid;
display: flex;
flex-direction: column;
font-size: var(--rhc-font-size-xs-desktop, inherit);
padding-block-end: var(--utrecht-blockquote-padding, var(--utrecht-blockquote-padding-block-end));
padding-block-start: var(--utrecht-blockquote-padding, var(--utrecht-blockquote-padding-block-start));
padding-inline-end: var(--utrecht-blockquote-padding, var(--utrecht-blockquote-padding-inline-end));
Expand Down
3 changes: 3 additions & 0 deletions packages/components-css/src/blockquote/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
--utrecht-blockquote-color: var(--utrecht-blockquote-content-color);
--utrecht-blockquote-font-size: var(--utrecht-blockquote-content-font-size);
--utrecht-document-font-family: var(--utrecht-blockquote-content-font-family);
--utrecht-blockquote-caption-font-size: var(--utrecht-blockquote-content-font-size);

line-height: 1.25;
Copy link
Contributor

Choose a reason for hiding this comment

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

Kan dit uit een var komen?


@include mixin.rhc-blockquote;
}
Expand Down
5 changes: 4 additions & 1 deletion packages/components-css/src/breadcrumb-nav/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
* Copyright (c) 2021 Community for NL Design System
*/

.utrecht-breadcrumb-nav .utrecht-link:any-link {
line-height: var(--utrecht-breadcrumb-nav-line-height, inherit) !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

Moet dit important zijn?

}

.utrecht-breadcrumb-nav {
line-height: var(--utrecht-breadcrumb-nav-line-height, inherit);
&__link {
--utrecht-link-icon-inset-block-start: var(--utrecht-breadcrumb-nav-link-icon-inset-block-start, inherit);

Expand Down
3 changes: 3 additions & 0 deletions packages/components-css/src/card/_mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
column-gap: var(--rhc-card-as-link-column-gap, 16px);
display: inline-flex;
flex-direction: column;
font-family: var(--rhc-font-family-primary, inherit);
font-size: var(--rhc-font-size-xs-desktop, inherit);
inline-size: var(--rhc-card-as-link-inline-size, 328px);
line-height: var(--rhc-line-height-md, inherit);
position: relative;
text-decoration: none;
}
Expand Down
2 changes: 2 additions & 0 deletions packages/components-css/src/dot-badge/_mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
border-radius: var(--rhc-dot-badge-border-radius, var(--rhc-border-radius-circle));
color: var(--rhc-dot-badge-color, var(--rhc-color-rood-500));
display: inline-block;
font-size: var(--rhc-font-size-xs-desktop, inherit);
inline-size: var(--rhc-dot-badge-inline-size, var(--rhc-size-quarter-lint));
line-height: var(--rhc-line-height-md, inherit);
}
6 changes: 6 additions & 0 deletions packages/components-css/src/figure/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@
border-start-start-radius: var(--utrecht-figure-img-border-start-start-radius);
}

.utrecht-figure {
font-size: var(--rhc-font-size-xs-desktop, inherit);
line-height: var(--rhc-line-height-md, inherit);
}

.utrecht-figure__caption {
border-inline-start: var(--utrecht-figure-caption-border-width) solid var(--utrecht-figure-caption-border-color);
font-family: var(--rhc-font-family-primary, inherit);
padding-block-end: var(--utrecht-figure-caption-padding-block-end);
padding-block-start: var(--utrecht-figure-caption-padding-block-start);
padding-inline-start: var(--utrecht-figure-caption-padding-inline-start);
Expand Down
2 changes: 2 additions & 0 deletions packages/components-css/src/file-input/index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.rhc-file-input {
display: flex;
flex-direction: column;
font-family: var(--rhc-font-family-primary, inherit);
line-height: var(--rhc-line-height-md, inherit);
row-gap: var(--rhc-file-input-row-gap);
}

Expand Down
1 change: 1 addition & 0 deletions packages/components-css/src/footer/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
.rhc-page-footer__section,
.rhc-page-footer__title {
break-inside: avoid;
line-height: var(--rhc-line-height-md, inherit);
padding-block-end: var(--rhc-page-footer-padding-block-end);
}

Expand Down
4 changes: 4 additions & 0 deletions packages/components-css/src/form-field/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
* @license EUPL-1.2
* Copyright (c) 2021 Community for NL Design System
*/
.utrecht-form-field {
font-size: var(--rhc-font-size-xs-desktop, inherit);
line-height: var(--rhc-line-height-md, inherit);
}

.utrecht-rich-text .utrecht-form-field {
margin-block-end: var(--utrecht-form-field-margin-block-end);
Expand Down
6 changes: 6 additions & 0 deletions packages/components-css/src/link-list/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@

.utrecht-link-list__item {
display: inline-flex;
font-family: var(--rhc-font-family-primary, inherit);
font-size: var(--rhc-font-size-xs-desktop, inherit);
}

.utrecht-link-list__item .utrecht-link:any-link {
line-height: var(--rhc-line-height-md, inherit);
}
3 changes: 3 additions & 0 deletions packages/components-css/src/link/_mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

column-gap: var(--utrecht-link-column-gap, inherit);
display: inline-flex;
font-family: var(--rhc-font-family-primary, inherit);
font-size: var(--rhc-font-size-xs-desktop, inherit);
line-height: var(--rhc-line-height-md, inherit);
}

@mixin rhc-link--icon {
Expand Down
2 changes: 2 additions & 0 deletions packages/components-css/src/pre-heading/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
.rhc-pre-heading {
--utrecht-pre-heading-color: var(--utrecht-heading-1-color, inherit);
--utrecht-pre-heading-font-weight: var(--rhc-font-weight-regular, inherit);
--utrecht-pre-heading-font-size: var(--rhc-font-size-xs-desktop, inherit);
--utrecht-pre-heading-line-height: var(--rhc-line-height-md, inherit);

grid-area: preheading;
}
Expand Down
4 changes: 4 additions & 0 deletions packages/components-css/src/radio-group/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@
.rhc-radio-group {
@include mixin.rhc-radio-group;
}

.utrecht-form-label {
line-height: 150%;
Copy link
Contributor

Choose a reason for hiding this comment

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

Waarom is dit 150%, kan dit uit een variabele komen of een rem zijn?

}
3 changes: 3 additions & 0 deletions packages/components-css/src/skip-link/_mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
box-shadow: var(--utrecht-skip-link-box-block-end-shadow-offset-x)
var(--utrecht-skip-link-box-block-end-shadow-offset-y) var(--utrecht-skip-link-box-block-end-shadow-blur-radius)
var(--utrecht-skip-link-box-block-end-shadow-spread-radius) var(--utrecht-skip-link-box-block-end-shadow-color);
font-family: var(--rhc-font-family-primary, inherit);
font-size: var(--rhc-font-size-xs-desktop, inherit);
font-weight: var(--utrecht-skip-link-font-weight, inherit);
line-height: var(--rhc-line-height-md, inherit);
position: revert;
text-underline-offset: var(--utrecht-skip-link-text-underline-offset, inherit);
}
6 changes: 6 additions & 0 deletions packages/components-css/src/table/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@
--_utrecht-table-cell-text-align: start;
}

&-cell {
--utrecht-table-cell-line-height: var(--rhc-line-height-md, inherit);
}

&--cell {
--utrecht-table-cell-line-height: var(--rhc-line-height-md, inherit);

&-row {
--utrecht-table-header-cell-font-weight: --utrecht-table-row-border-block-end-width;

Expand Down
2 changes: 1 addition & 1 deletion packages/components-css/src/unordered-list/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
font-family: var(--utrecht-unordered-list-font-family);
font-size: var(--utrecht-unordered-list-font-size);
font-weight: var(--utrecht-unordered-list-font-weight);
line-height: var(--utrecht-unordered-list-line-heigh);
line-height: var(--utrecht-unordered-list-line-height);
padding-inline-start: var(--utrecht-unordered-list-padding-inline-start);
}

Expand Down
3 changes: 1 addition & 2 deletions packages/storybook/config/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import '@rijkshuisstijl-community/components-css/dist/index.css';
import { defineCustomElements } from '@rijkshuisstijl-community/web-components-stencil/loader/index';
import { withThemeByClassName } from '@storybook/addon-themes';
import { Preview } from '@storybook/react';
import { UtrechtDocument } from '@utrecht/web-component-library-react';
import { defineCustomElements as defineUtrechtCustomElements } from '@utrecht/web-component-library-stencil/loader/index';

// Initialize web components
Expand All @@ -28,7 +27,7 @@ const preview: Preview = {
},
defaultTheme: 'RijkshuisstijlCommunity',
}),
(Story: any) => <UtrechtDocument>{Story()}</UtrechtDocument>,
(Story: any) => Story(),
],
parameters: {
previewTabs: {
Expand Down
18 changes: 18 additions & 0 deletions proprietary/design-tokens/figma/figma.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -3338,6 +3338,10 @@
"line-height": {
"value": "{rhc.line-height.paragraph}",
"type": "lineHeights"
},
"font-size": {
"value": "{rhc.font-size.xs.desktop}",
"type": "fontSizes"
}
},
"img": {
Expand Down Expand Up @@ -3565,6 +3569,12 @@
"value": "{rhc.space.100}",
"type": "spacing"
}
},
"error-message": {
"line-height": {
"value": "normal",
"type": "lineHeights"
}
}
}
}
Expand Down Expand Up @@ -6172,6 +6182,10 @@
"padding-inline-start": {
"value": "{rhc.space.200}",
"type": "spacing"
},
"line-height": {
"value": "{rhc.line-height.md}",
"type": "lineHeights"
}
},
"data-cell": {
Expand Down Expand Up @@ -6305,6 +6319,10 @@
"type": "color"
}
}
},
"font-size": {
"value": "{rhc.font-size.xs.desktop}",
"type": "fontSizes"
}
}
}
Expand Down
Loading