Visitar URL original
USWDS - Windows High Contrast Mode Update by mahoneycm · Pull Request #4610 · uswds/uswds · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
4ba785b
Added forced-color settings for users viewing components in high cont…
Feb 9, 2022
280ca58
Changed forced-color :checked background color to only affect radio b…
Feb 9, 2022
24e1bff
Added outline to range slider thumb in forced-colors mode for high co…
Feb 9, 2022
26cbc9a
Removed test media query
Feb 9, 2022
4f9f5ab
Added space before media query for readability
Feb 10, 2022
3783ae6
Merge pull request #4510 from uswds/cm-hc-range-slider
Feb 10, 2022
585a5ed
Fixed Checkbox checked indicators in high contrast mode
Feb 11, 2022
639c9db
Adds accordion stylings for high contrast mode
Feb 14, 2022
ac63ff7
Added space before forced-color media queries for legibility
Feb 15, 2022
085c6da
Added consistency with outline-offset and outline
Feb 15, 2022
47d0220
Removed quotations from add-background-svg with a variable
Feb 15, 2022
5a2d1b1
Removed unnecessary space in accordion.scss
Feb 15, 2022
434a501
Contained ButtonText background color in forced-color media query
Feb 16, 2022
d956bc3
Added forced-color stylings for high contrast mode
Feb 16, 2022
4b2703c
Added high contrast stylings for open and close chevrons in above tab…
Feb 17, 2022
3b04f16
Added styling for high contrast mode
Feb 18, 2022
b259010
Created icon masks. Messy testing
Feb 22, 2022
2b2d69b
Added high contrast styling solution for chevrons in big footer varia…
Feb 22, 2022
fe9a388
Merge pull request #4509 from uswds/cm-radio-high-contrast
Feb 22, 2022
4dbfb6a
Merge pull request #4523 from uswds/cm-hc-pagination
Feb 22, 2022
cd2dfa1
Added WHC color fix for mobile chevron
Feb 23, 2022
b6ff3d3
Merge branch 'develop' of https://github.com/uswds/uswds into cm-high…
Mar 4, 2022
95d6256
Added High Contrast system colors to system tokens
Mar 3, 2022
b73b435
Added combobox high contrast styles
Mar 3, 2022
6f85cd6
Added High Contrast system colors to system tokens
Mar 3, 2022
97a0d8f
Removes non-breaking space from date picker button on js
Mar 14, 2022
0ef1b82
Set standard high contrast colors for date-picker and range picker
Mar 14, 2022
bcba832
Declares default for contrast-bg in icons.scss
Mar 14, 2022
50a7dc2
Removes unnecessary contrast-bg declarations
Mar 14, 2022
0f0bbaf
Merge branch 'develop' of https://github.com/uswds/uswds into cm-hc-t…
Mar 14, 2022
845924d
Merge pull request #4555 from uswds/cm-hc-tokens
Mar 14, 2022
d2acd87
Switched selected date & date range colors.
Mar 14, 2022
218d6e2
Prevents calendar icon from disappearing after being clicked in high …
Mar 14, 2022
6b26cd6
Merge branch 'develop' of https://github.com/uswds/uswds into cm-hc-d…
Mar 14, 2022
c288bf3
Merge branch 'cm-high-contrast-a11y' of https://github.com/uswds/uswd…
Mar 15, 2022
a2f1c5e
Changed -object to -map to fix external link icon error
Mar 15, 2022
628683c
Sass cleanup
Mar 18, 2022
df6f974
Pseudo element cleanup
Mar 18, 2022
05b8264
Merge branch 'develop' of https://github.com/uswds/uswds into cm-hc-b…
Mar 18, 2022
6010691
Merge branch 'develop' of https://github.com/uswds/uswds into cm-hc-a…
Mar 21, 2022
135349c
Footer sass clean-up
Mar 21, 2022
7e95e56
Merge branch 'develop' of https://github.com/uswds/uswds into cm-hc-f…
Mar 21, 2022
4aa4b97
Date picker icon map clean-up
Mar 21, 2022
847c395
Merge pull request #4521 from uswds/cm-hc-accordion
Mar 21, 2022
437b7d1
Added high contrast colors for lock icon on banner
Mar 21, 2022
6d79a3e
Merge pull request #4529 from uswds/cm-hc-banner
Mar 21, 2022
54e7665
Replaced background svgs using place-icon
Mar 21, 2022
e1437af
WHC cleanup for calendar button
Mar 21, 2022
c81177b
Replace icon mask with background SVG for standard view
Mar 22, 2022
2d05788
Update src/stylesheets/elements/form-controls/_date-picker.scss
Mar 22, 2022
9e37eff
Revert "Merge pull request #4521 from uswds/cm-hc-accordion"
Mar 23, 2022
a066e65
Revert "Added high contrast colors for lock icon on banner"
Mar 23, 2022
5b5d1fc
Revert "Merge pull request #4529 from uswds/cm-hc-banner"
Mar 23, 2022
555e85d
Added defaults for place-icon() variables
Mar 24, 2022
e39a59f
Set accordion forced-color-adjust to none
Mar 24, 2022
3b22f40
Added high contrast mode colors to Banner
Mar 24, 2022
e4a0117
Added high contrast themes for the search component
Mar 24, 2022
f5791b9
Added new high contrast themes to navigation that work with accordion…
Mar 24, 2022
f0abf32
Added high contrast mode support to add-bar mixin
Mar 24, 2022
62b565d
Changed high contrast social buttons to light grey
Mar 25, 2022
bd7ee12
CSS cleanup
Mar 25, 2022
71b6ef2
Updated banner component link text color on mobile high contrast view
Mar 25, 2022
97b815f
Fixed icon styles and added chevron icons to year picker
Mar 25, 2022
657837b
Merge branch 'cm-hc-date-picker-tokens' of https://github.com/uswds/u…
Mar 25, 2022
70eb57e
removed background-image: initial from expand more chevron
Mar 25, 2022
ef7b151
Consistent `::after` and `::before`
Mar 25, 2022
c1dae62
CSS refactoring
Mar 25, 2022
fd0037c
Run prettier.
Mar 25, 2022
6adaaa6
Merge pull request #4528 from uswds/cm-hc-footer
Mar 25, 2022
0b779fb
Merge pull request #4604 from uswds/cm-hc-accordion-banner-header
Mar 25, 2022
e464601
Fix include order
Mar 25, 2022
bd6e7a7
Merge pull request #4581 from uswds/cm-hc-date-picker-tokens
Mar 25, 2022
554f1d8
Removed unnecessary default declarations from place-icon in banner
Mar 28, 2022
ab0dbc7
Replaced missing absolute position on banner chevron
Mar 28, 2022
f535313
Removed unnecessary default declarations from place-icon in footer
Mar 28, 2022
fd235f3
Removed unnecessary default declarations from place-icon in date-picker
Mar 28, 2022
c5f7589
Removed unnecessary contrast-bg declaration from banner
Mar 28, 2022
c8e0ff3
Banner fix chevron mask placement
Mar 30, 2022
963c02f
Merge pull request #4609 from uswds/cm-hc-tidy-up
Mar 30, 2022
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
Prev Previous commit
Next Next commit
Adds accordion stylings for high contrast mode
  • Loading branch information
Charlie Mahoney
Charlie Mahoney committed Feb 14, 2022
commit 639c9db597f2cfeeddbdebfaab2f0d6dfcb6844b
66 changes: 63 additions & 3 deletions src/stylesheets/components/_accordions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,34 @@
$accordion-border: units($theme-accordion-border-width) solid
color($theme-accordion-border-color);

// Maps for Icons

$icon-object: (
"color": currentColor,
"svg-height": 24,
"svg-width": 24,
"height": units(3),
);

$add-icon: map-merge(
$icon-object,
(
"name": "add",
)
);

$remove-icon: map-merge(
$icon-object,
(
"name": "remove",
)
);

$after: "after";
$icon-margin: "auto";
$vertical-align: "auto";
$contrast-bg: default;

// Accordion Styles

@mixin accordion-list-styles {
Expand All @@ -16,7 +44,13 @@ $accordion-border: units($theme-accordion-border-width) solid
// scss-lint:disable PropertyCount
@mixin accordion-button-styles {
@include button-unstyled;
@include add-background-svg("usa-icons/remove");
@include place-icon(
$remove-icon,
$after,
$icon-margin,
$vertical-align,
$contrast-bg
);

background-color: color("base-lightest");
background-position: right units(2.5) center;
Expand All @@ -39,8 +73,17 @@ $accordion-border: units($theme-accordion-border-width) solid
// scss-lint:enable PropertyCount

@mixin accordion-button-unopened-styles {
@include add-background-svg("usa-icons/add");
background-size: units(3);
@include place-icon(
$add-icon,
$after,
$icon-margin,
$vertical-align,
$contrast-bg
);
&::after {
height: 100%;
background-color: ButtonText;
}
}

@mixin accordion-nested-list {
Expand Down Expand Up @@ -109,6 +152,23 @@ $accordion-border: units($theme-accordion-border-width) solid

.usa-accordion__button {
@include accordion-button-styles;

// Anchor for add/remove icons
position: relative;

&::after {
right: 0;
top: 0;
height: 100%;
content: "";
position: absolute;
margin: 0 units(2.5) 0 0;
background-color: ButtonText;
}

@media (forced-colors: active) {
outline: 2px solid transparent;
}
}

.usa-accordion__button[aria-expanded="false"] {
Expand Down