Skip to content

Commit a7ed858

Browse files
authored
feat(hint): apply tokens (#6030)
* feat(hint): apply tokens * feat(hint): fix typo * feat(hint): update spacing * feat(hint): update border radius * feat(hint): fix heading font
1 parent b4e3f7d commit a7ed858

2 files changed

Lines changed: 28 additions & 32 deletions

File tree

src/patternfly/components/Hint/hint.scss

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,36 @@
11
// @debug $hint; // check your variable names located in src/patternfly/sass-utilities/component-namespaces.scss
22

3-
.#{$hint} {
4-
--#{$hint}--GridRowGap: var(--#{$pf-global}--spacer--md);
5-
--#{$hint}--PaddingTop: var(--#{$pf-global}--spacer--lg);
6-
--#{$hint}--PaddingRight: var(--#{$pf-global}--spacer--lg);
7-
--#{$hint}--PaddingBottom: var(--#{$pf-global}--spacer--lg);
8-
--#{$hint}--PaddingLeft: var(--#{$pf-global}--spacer--lg);
9-
--#{$hint}--BackgroundColor: var(--#{$pf-global}--palette--blue-50);
10-
--#{$hint}--BorderColor: var(--#{$pf-global}--palette--blue-100);
11-
--#{$hint}--BorderWidth: var(--#{$pf-global}--BorderWidth--sm);
12-
--#{$hint}--BoxShadow: var(--#{$pf-global}--BoxShadow--sm);
13-
--#{$hint}--Color: var(--#{$pf-global}--Color--100);
3+
:root {
4+
--#{$hint}--GridRowGap: var(--pf-t--global--spacer--sm);
5+
--#{$hint}--PaddingTop: var(--pf-t--global--spacer--lg);
6+
--#{$hint}--PaddingRight: var(--pf-t--global--spacer--lg);
7+
--#{$hint}--PaddingBottom: var(--pf-t--global--spacer--lg);
8+
--#{$hint}--PaddingLeft: var(--pf-t--global--spacer--lg);
9+
--#{$hint}--BackgroundColor: var(--pf-t--global--background--color--primary--default);
10+
--#{$hint}--BorderColor: var(--pf-t--global--border--color--status--info--default);
11+
--#{$hint}--BorderWidth: var(--pf-t--global--border--width--200); // TODO - need semantic variable
12+
--#{$hint}--BorderRadius: var(--pf-t--global--border--radius--medium);
13+
--#{$hint}--Color: var(--pf-t--global--text--color--regular);
1414

1515
// Hint Title
16-
--#{$hint}__title--FontSize: var(--#{$pf-global}--FontSize--lg);
16+
--#{$hint}__title--FontFamily: var(--pf-t--global--font--family--heading);
17+
--#{$hint}__title--FontSize: var(--pf-t--global--font--size--heading--xs);
18+
--#{$hint}__title--FontWeight: var(--pf-t--global--font--weight--heading);
19+
--#{$hint}__title--LineHeight: var(--pf-t--global--font--line-height--heading);
1720

1821
// Hint Body
19-
--#{$hint}__body--FontSize: var(--#{$pf-global}--FontSize--md);
22+
--#{$hint}__body--FontSize: var(--pf-t--global--font--size--body--md);
2023

2124
// Hint Footer
22-
--#{$hint}__footer--child--MarginRight: var(--#{$pf-global}--spacer--md);
25+
--#{$hint}__footer--MarginTop: var(--pf-t--global--spacer--sm);
26+
--#{$hint}__footer--child--MarginRight: var(--pf-t--global--spacer--md);
2327

2428
// Hint Actions
25-
--#{$hint}__actions--MarginLeft: var(--#{$pf-global}--spacer--2xl);
26-
--#{$hint}__actions--c-dropdown--MarginTop: calc(var(--#{$pf-global}--spacer--form-element) * -1);
29+
--#{$hint}__actions--MarginLeft: var(--pf-t--global--spacer--2xl);
30+
--#{$hint}__actions--c-dropdown--MarginTop: calc(var(--#{$pf-global}--spacer--form-element) * -1); // TODO form element spacer
31+
}
2732

33+
.#{$hint} {
2834
display: grid;
2935
grid-template-columns: 1fr auto;
3036
grid-row-gap: var(--#{$hint}--GridRowGap);
@@ -35,7 +41,7 @@
3541
color: var(--#{$hint}--Color);
3642
background-color: var(--#{$hint}--BackgroundColor);
3743
border: var(--#{$hint}--BorderWidth) solid var(--#{$hint}--BorderColor);
38-
box-shadow: var(--#{$hint}--BoxShadow);
44+
border-radius: var(--#{$hint}--BorderRadius);
3945

4046
// Remove this when the inline link button is updated
4147
.#{$button}.pf-m-link.pf-m-inline {
@@ -63,7 +69,11 @@
6369
}
6470

6571
.#{$hint}__title {
72+
align-self: center;
73+
font-family: var(--#{$hint}__title--FontFamily);
6674
font-size: var(--#{$hint}__title--FontSize);
75+
font-weight: var(--#{$hint}__title--FontWeight);
76+
line-height: var(--#{$hint}__title--LineHeight);
6777
}
6878

6979
.#{$hint}__body {
@@ -73,15 +83,9 @@
7383

7484
.#{$hint}__footer {
7585
grid-column: 1 / -1;
86+
margin-block-start: var(--#{$hint}__footer--MarginTop);
7687

7788
> :not(:last-child) {
7889
margin-inline-end: var(--#{$hint}__footer--child--MarginRight);
7990
}
8091
}
81-
82-
// stylelint-disable no-invalid-position-at-import-rule
83-
@import "themes/dark/hint";
84-
85-
@include pf-v5-theme-dark {
86-
@include pf-v5-theme-dark-hint;
87-
}

src/patternfly/components/Hint/themes/dark/hint.scss

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)