Skip to content

Commit

Permalink
feat: introduce focus variables
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmch committed Oct 16, 2023
1 parent 9baddfe commit 262fc72
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/blocks/ContentLayout/ContentLayout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ $block: '.#{$ns}content-layout-block';
padding: $indentXL;
}

&_theme {
&_dark {
--g-color-line-focus: var(--pc-color-line-focus-dark);
}
}

@media (max-width: map-get($gridBreakpoints, 'sm')) {
&_background {
padding: $indentM;
Expand Down
2 changes: 2 additions & 0 deletions src/sub-blocks/BannerCard/BannerCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ $block: '.#{$ns}banner-card';
$borderRadius: $borderRadius;

&_theme_dark {
--g-color-line-focus: var(--pc-color-line-focus-dark);

@include add-specificity(&) {
#{$class}__title,
#{$class}__subtitle {
Expand Down
2 changes: 2 additions & 0 deletions src/sub-blocks/Content/Content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ $darkSecondary: var(--g-color-text-dark-secondary);

&_theme {
&_dark {
--g-color-line-focus: var(--pc-color-line-focus-dark);

#{$block}__title *,
#{$block}__text .yfm,
#{$block}__text .yfm *,
Expand Down
4 changes: 4 additions & 0 deletions src/sub-blocks/HubspotForm/HubspotForm.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
$block: '.#{$ns}hubspot-form';

#{$block} {
--g-color-line-focus: var(--pc-color-line-focus-light);

$requiredWidth: 10px;
$checkbox: 17px;
$checkboxIcon: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgZmlsbD0ibm9uZSIgdmlld0JveD0iMCAwIDE4IDE4Ij4KICAgIDxwYXRoIGQ9Ik0xNS42MjMgMWwtOS4xNSAxMy4xNzQtNC4yODctNC42TDEgMTEuMDMgNi42MiAxNyAxNyAyLjI3IDE1LjYyMyAxeiIgZmlsbD0iIzAwMDAwMCIvPgo8L3N2Zz4K');
Expand Down Expand Up @@ -423,6 +425,8 @@ $block: '.#{$ns}hubspot-form';

&_theme {
&_dark {
--g-color-line-focus: var(--pc-color-line-focus-dark);

.hs-form-field .input select {
background-image: $selectChevronDark;
}
Expand Down
6 changes: 6 additions & 0 deletions styles/root.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,18 @@
--pc-monochrome-button-background-color-hover
);

// focus color
--pc-color-line-focus-light: var(--g-color-text-brand);
--pc-color-line-focus-dark: var(--g-color-text-light-primary);

&_theme_light {
@include pc-colors-light;
--g-color-line-focus: var(--pc-color-line-focus-light);
}

&_theme_dark {
@include pc-colors-dark;
--g-color-line-focus: var(--pc-color-line-focus-dark);
}

&.g-root_theme_dark {
Expand Down

0 comments on commit 262fc72

Please sign in to comment.