@solexllc/usx-uswds-fixes 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@solexllc/usx-uswds-fixes",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "SCSS corrections and overrides layered on top of upstream USWDS.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/solexconsulting/usx.git",
|
|
9
|
+
"directory": "packages/usx-uswds-fixes"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"sass": "src/index.scss",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"sass": "./src/index.scss"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"src"
|
|
22
|
+
],
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@solexllc/usx-theme": "workspace:*"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* stylelint-disable selector-class-pattern -- USWDS class names use their own BEM convention. */
|
|
2
|
+
|
|
3
|
+
// Fix: USWDS's nav-list mixin gives primary-nav dropdown/megamenu links
|
|
4
|
+
// (nested inside .usa-nav__submenu) a hover state on mobile widths
|
|
5
|
+
// (.usa-nav__primary a:not(.usa-button):hover), but no equivalent rule
|
|
6
|
+
// exists at desktop widths — only the top-level <a> links and the
|
|
7
|
+
// dropdown-toggle <button>s get desktop hover feedback. Add the missing
|
|
8
|
+
// desktop hover treatment for submenu links, matching the color USWDS
|
|
9
|
+
// already uses for top-level anchor hover.
|
|
10
|
+
@media (width >= 64em) {
|
|
11
|
+
// Fix: USWDS's nav-list mixin gives primary-nav dropdown/megamenu links
|
|
12
|
+
// (nested inside .usa-nav__submenu) a hover state on mobile widths
|
|
13
|
+
// (.usa-nav__primary a:not(.usa-button):hover), but no equivalent rule
|
|
14
|
+
// exists at desktop widths — only the top-level <a> links and the
|
|
15
|
+
// dropdown-toggle <button>s get desktop hover feedback. Add the missing
|
|
16
|
+
// desktop hover treatment for submenu links, matching the color USWDS
|
|
17
|
+
// already uses for top-level anchor hover.
|
|
18
|
+
.usa-nav__submenu a:hover {
|
|
19
|
+
color: #005ea2;
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Fix: USWDS basic header with several nav links can cause congestion
|
|
24
|
+
// which wraps the chevron in the link to the next line. This fix favors
|
|
25
|
+
// shrinking the logo and allowing the link text to remain on one line.
|
|
26
|
+
.usa-nav__link > span {
|
|
27
|
+
text-wrap: nowrap;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* stylelint-disable selector-class-pattern -- USWDS class names use their own BEM convention. */
|
|
2
|
+
|
|
3
|
+
// Fix: enlarge the default (non-small) search submit icon button hit area.
|
|
4
|
+
.usa-search:not(.usa-search--small) {
|
|
5
|
+
.usa-search__submit-icon {
|
|
6
|
+
width: 1.5rem;
|
|
7
|
+
height: 1.5rem;
|
|
8
|
+
padding-left: 0.75rem;
|
|
9
|
+
padding-right: 0.75rem;
|
|
10
|
+
min-width: 3rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@media screen and (width >= 30em) {
|
|
14
|
+
.usa-search__submit-icon {
|
|
15
|
+
width: 3rem;
|
|
16
|
+
height: 2rem;
|
|
17
|
+
padding: 0;
|
|
18
|
+
margin: 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
package/src/index.scss
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// @solexllc/usx-uswds-fixes
|
|
2
|
+
// Generic corrections to upstream USWDS component styles (no USX branding).
|
|
3
|
+
// Aggregated entry — @forward each fix module below.
|
|
4
|
+
|
|
5
|
+
@forward './components/radio-buttons';
|
|
6
|
+
@forward './components/checkbox';
|
|
7
|
+
@forward './components/search';
|
|
8
|
+
@forward './components/step-indicator';
|
|
9
|
+
@forward './components/header';
|