Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
783 changes: 783 additions & 0 deletions playground/Theming.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/components/Accordion/accordion-item.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

:host([density="compact"]) .accordion-body {
font-size: var(--sgds-font-size-body-sm);
font-size: var(--sgds-font-size-label-sm);
line-height: var(--sgds-line-height-2-xs);
}

Expand Down Expand Up @@ -99,7 +99,7 @@ slot[name="caret"] sgds-icon {
.accordion-body {
padding: 0;
overflow: hidden;
font-size: var(--sgds-font-size-body-md);
font-size: var(--sgds-font-size-label-md);
line-height: var(--sgds-line-height-xs);
color: var(--sgds-body-color-subtle);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Alert/alert-link.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.alert-link:hover {
color: var(--sgds-alert-color);
text-decoration-line: underline;
font-size: var(--sgds-font-size-body-sm);
font-size: var(--sgds-font-size-label-sm);
font-weight: var(--sgds-font-weight-regular);
line-height: var(--sgds-line-height-2-xs);
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Alert/alert.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@
}
.alert-content__description {
display: inline;
font-size: var(--sgds-font-size-body-sm);
font-size: var(--sgds-font-size-label-sm);
font-weight: var(--sgds-font-weight-regular);
line-height: var(--sgds-line-height-2-xs);
}

.alert-content__description::slotted(*) {
font-size: var(--sgds-font-size-body-sm);
font-size: var(--sgds-font-size-label-sm);
font-weight: var(--sgds-font-weight-regular);
line-height: var(--sgds-line-height-2-xs);
}
Expand Down
1 change: 1 addition & 0 deletions src/components/Breadcrumb/breadcrumb-item.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
gap: var(--sgds-gap-xs);
align-items: center;
min-width: 0;
font-size: var(--sgds-font-size-link-md);
}

:host .nav-link::slotted(*) {
Expand Down
1 change: 0 additions & 1 deletion src/components/Datepicker/datepicker.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
--datepicker-selected-date-bg: var(--sgds-primary);
--datepicker-selected-date-color: white;

font-size: var(--sgds-font-size-14);
}

:host([menuisopen]:not([disabled]):not([readonly])) .dropdown-menu {
Expand Down
8 changes: 4 additions & 4 deletions src/components/DescriptionList/description-list-group.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ slot[name="title"]::slotted(*) {
color: var(--sgds-heading-color-default);
font-weight: var(--sgds-font-weight-semibold);
letter-spacing: var(--sgds-letter-spacing-tight);
font-size: var(--sgds-font-size-24);
line-height: var(--sgds-line-height-32);
font-size: var(--sgds-font-size-heading-sm);
line-height: var(--sgds-line-height-sm);
}

slot[name="description"]::slotted(*) {
font-weight: var(--sgds-font-weight-regular);
color: var(--sgds-color-subtle);
font-size: var(--sgds-font-size-16);
line-height: var(--sgds-line-height-24);
font-size: var(--sgds-font-size-label-md);
line-height: var(--sgds-line-height-xs);
}

.header {
Expand Down
4 changes: 2 additions & 2 deletions src/components/DescriptionList/description-list.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
.label {
color: var(--sgds-color-default);
font-weight: var(--sgds-font-weight-semibold);
font-size: var(--sgds-font-size-16);
font-size: var(--sgds-font-size-label-md);
}

.data {
color: var(--sgds-color-subtle);
font-size: var(--sgds-font-size-16);
font-size: var(--sgds-font-size-label-md);
font-weight: var(--sgds-font-weight-regular);
margin: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Drawer/drawer.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ sgds-close-button.drawer-close {

slot[name="title"]::slotted(*) {
margin-bottom: var(--sgds-margin-none) !important;
font-size: var(--sgds-font-size-24) !important;
font-size: var(--sgds-font-size-heading-sm) !important;
color: var(--sgds-color-default) !important;
}

Expand Down
1 change: 1 addition & 0 deletions src/components/Dropdown/dropdown-item.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
color: var(--sgds-color-default);
text-align: inherit;
cursor: pointer;
font-size: var(--sgds-font-size-label-sm);
}

.dropdown-item:hover {
Expand Down
8 changes: 4 additions & 4 deletions src/components/FileUpload/file-upload.css
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@

.file-upload-item-error-message {
color: var(--sgds-form-danger-color-default);
font-size: var(--sgds-font-size-12);
line-height: var(--sgds-line-height-16);
font-size: var(--sgds-font-size-label-sm,);
line-height: var(--sgds-line-height-2-xs);
}

ul {
Expand Down Expand Up @@ -139,8 +139,8 @@ sgds-icon.invalid {
}

.drag-drop-text {
font-size: var(--sgds-font-size-14);
line-height: var(--sgds-line-height-20);
font-size: var(--sgds-font-size-label-sm);
line-height: var(--sgds-line-height-2-xs);
}

.drag-drop-zone:focus,
Expand Down
8 changes: 4 additions & 4 deletions src/components/IconList/icon-list.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ slot::slotted(*){
}

.sm {
font-size: var(--sgds-font-size-14);
line-height: var(--sgds-line-height-20);
font-size: var(--sgds-font-size-label-sm);
line-height: var(--sgds-line-height-2-xs);
}

.lg {
font-size : var(--sgds-font-size-20);
line-height: var(--sgds-line-height-32);
font-size : var(--sgds-font-size-label-lg);
line-height: var(--sgds-line-height-md);
}
16 changes: 8 additions & 8 deletions src/components/Link/link.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,25 @@
}

:host([size="md"]) .nav-link::slotted(a) {
line-height: var(--sgds-line-height-24) !important;
font-size: var(--sgds-font-size-16) !important;
line-height: var(--sgds-line-height-xs) !important;
font-size: var(--sgds-font-size-link-md) !important;
--text-underline-offset: 3px;
}
:host([size="lg"]) .nav-link::slotted(a) {
font-size: var(--sgds-font-size-20) !important;
line-height: var(--sgds-line-height-32) !important;
font-size: var(--sgds-font-size-link-lg) !important;
line-height: var(--sgds-line-height-md) !important;
--text-underline-offset: 4px;
}

:host([size="sm"]) .nav-link::slotted(a) {
line-height: var(--sgds-line-height-20) !important;
font-size: var(--sgds-font-size-14) !important;
line-height: var(--sgds-line-height-2-xs) !important;
font-size: var(--sgds-font-size-link-sm) !important;
--text-underline-offset: 2.8px;
}

:host([size="xs"]) .nav-link::slotted(a) {
line-height: var(--sgds-line-height-16) !important;
font-size: var(--sgds-font-size-12) !important;
line-height: var(--sgds-line-height-3-xs) !important;
font-size: var(--sgds-font-size-link-xs) !important;
--text-underline-offset: 2.2px;
}
/* External Links */
Expand Down
4 changes: 4 additions & 0 deletions src/components/Mainnav/mainnav-dropdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
text-decoration: none;
padding: var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);
box-sizing: border-box;
font-size: var(--sgds-font-size-label-sm);
line-height: var(--sgds-line-height-2-xs, 20px);
}

.nav-link:not(.disabled).active,
Expand Down Expand Up @@ -97,6 +99,8 @@
padding: var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);
max-width: var(--sgds-mainnav-max-width, 1440px);
margin: auto;
font-size: var(--sgds-font-size-label-sm);
line-height: var(--sgds-line-height-2-xs, 20px);
}

.dropdown-items a:hover {
Expand Down
2 changes: 2 additions & 0 deletions src/components/Mainnav/mainnav-item.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@
color: var(--sgds-color-default) !important;
padding: var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);
box-sizing: border-box;
font-size: var(--sgds-font-size-label-sm);
line-height: var(--sgds-line-height-2-xs, 20px);
}

@media screen and (min-width: 1024px) {
Expand Down
2 changes: 2 additions & 0 deletions src/components/Mainnav/mainnav.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ nav {
max-width: var(--sgds-mainnav-max-width, 1440px);
min-height: 80px;
margin: auto;
font-size: var(--sgds-font-size-label-sm);
}

:host([fluid]) .navbar {
Expand All @@ -31,6 +32,7 @@ nav {
align-items: center;
text-decoration: none;
white-space: nowrap;
color: var(--sgds-color-default);
}

.navbar-brand:focus-visible {
Expand Down
6 changes: 3 additions & 3 deletions src/components/Mainnav/sgds-mainnav-dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@ export class SgdsMainnavDropdown extends SgdsElement {
@keydown=${this._handleKeyboardOpen}
>
<slot name="toggler"></slot>
<sgds-icon name="chevron-right"></sgds-icon>
<sgds-icon name="chevron-right" size="md"></sgds-icon>
</a>
<div class="dropdown-items">
<a tabindex="0" role="button" @click=${this._closeMenu} @keydown=${this._handleHeaderKeyboardEvent}>
<sgds-icon name="chevron-left"></sgds-icon>
<sgds-icon name="chevron-left" size="md"></sgds-icon>
<span></span>
</a>
<slot @slotchange=${this._handleSlotChange}></slot>
Expand All @@ -316,7 +316,7 @@ export class SgdsMainnavDropdown extends SgdsElement {
slot="toggler"
>
<slot name="toggler"></slot>
<sgds-icon name="chevron-down"></sgds-icon>
<sgds-icon name="chevron-down" size="md"></sgds-icon>
</a>
<slot @slotchange=${this._handleDesktopSlotChange}></slot>
</sgds-dropdown>`;
Expand Down
6 changes: 3 additions & 3 deletions src/components/Modal/modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ slot[name="title"]::slotted(*) {
align-items: center;
gap: 1rem;
margin: var(--sgds-margin-none) !important;
line-height: var(--sgds-line-height-40) !important;
font-size: var(--sgds-font-size-24) !important;
line-height: var(--sgds-line-height-lg) !important;
font-size: var(--sgds-font-size-heading-sm) !important;
}

slot[name="description"]::slotted(*) {
margin: var(--sgds-margin-none) !important;
color: var(--sgds-color-subtle);
line-height: var(--sgds-line-height-24);
line-height: var(--sgds-line-height-xs);
}

.modal-body {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Pagination/pagination.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ svg {
}

.pagination-sm .page-link {
font-size: var(--sgds-font-size-14);
font-size: var(--sgds-font-size-label-sm);
width: var(--sgds-dimension-40);
height: var(--sgds-dimension-40);
}
Expand All @@ -85,5 +85,5 @@ svg {
}

.pagination-sm .pagination-description {
font-size: var(--sgds-font-size-14);
font-size: var(--sgds-font-size-label-sm);
}
2 changes: 1 addition & 1 deletion src/components/ProgressBar/progress-bar.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ progress {

.label {
white-space: nowrap;
font-size: var(--sgds-font-size-14);
font-size: var(--sgds-font-size-label-sm);
color: var(--sgds-color-subtle);
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/Sidebar/sidebar-item.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
}

.sidebar-item-label {
font-size: var(--sgds-font-size-1);
line-height: var(--sgds-line-height-20);
font-size: var(--sgds-font-size-label-sm);
line-height: var(--sgds-line-height-2-xs);
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
Expand Down
5 changes: 3 additions & 2 deletions src/components/Sidebar/sidebar-section.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
display: flex;
align-items: center;
gap: var(--sgds-gap-2-xs);
font-size: var(--sgds-font-size-0);
line-height: var(--sgds-line-height-20);
cursor: pointer;
font-size: var(--sgds-font-size-label-xs);
line-height: var(--sgds-line-height-2-xs);
color: var(--sgds-label-color-subtle);
padding: var(--sgds-padding-xs) var(--sgds-padding-sm);
border-radius: var(--sgds-border-radius-md);
Expand Down
8 changes: 4 additions & 4 deletions src/components/Sidenav/sidenav-item.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ button {
.sidenav-btn {
width: 100%;
text-align: initial;
line-height: var(--sgds-line-height-24);
font-size: var(--sgds-font-size-16);
line-height: var(--sgds-line-height-xs);
font-size: var(--sgds-font-size-label-md);
border: 0;
background: 0;
padding: var(--sgds-padding-sm) var(--sgds-padding-sm) var(--sgds-padding-sm)
Expand Down Expand Up @@ -56,8 +56,8 @@ button {
.no-menu-default::slotted(a) {
text-decoration: none !important;
color: inherit !important;
line-height: var(--sgds-line-height-24) !important;
font-size: var(--sgds-font-size-16);
line-height: var(--sgds-line-height-xs) !important;
font-size: var(--sgds-font-size-label-md);
border: 0;
background: 0;
padding: var(--sgds-padding-sm) var(--sgds-padding-sm) var(--sgds-padding-sm)
Expand Down
2 changes: 1 addition & 1 deletion src/components/Spinner/spinner.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
}

.spinner-label {
font-size: var(--sgds-font-size-14);
font-size: var(--sgds-font-size-label-sm);
color: var(--sgds-neutral-color-default);
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/Subnav/subnav-item.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
display: inline-block;
width: 100%;
text-decoration: none !important;
font-size: var(--sgds-font-size-14) !important;
font-size: var(--sgds-font-size-label-sm) !important;
color: var(--sgds-link-color-default, var(--sgds-color-default));
padding: var(--sgds-padding-sm) var(--sgds-padding-lg);
cursor: pointer;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Switch/switch.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ input {
}

:host([size="sm"]) .form-check {
font-size: var(--sgds-font-size-14);
font-size: var(--sgds-font-size-label-sm);
}

:host([size="sm"]) .form-check-input {
Expand All @@ -68,7 +68,7 @@ input {
}

:host([size="lg"]) .form-check {
font-size: var(--sgds-font-size-20);
font-size: var(--sgds-font-size-label-lg);
}

:host([size="lg"]) .form-check-input {
Expand Down
Loading
Loading