Skip to content

Commit

Permalink
update web-components to use variables from css-library (#945)
Browse files Browse the repository at this point in the history
* update repo to use variables from css-library

* updated lock file

* set version of css-library dep

* update yarn.lock

* add css-library to root level package.json
  • Loading branch information
it-harrison authored Nov 15, 2023
1 parent afb8c5a commit 4c9d250
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 213 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"prism": "^1.27.0"
},
"dependencies": {
"@department-of-veterans-affairs/css-library": "^0.0.1",
"webpack": "5"
}
}
1 change: 1 addition & 0 deletions packages/web-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"serve": "stencil build --dev --watch --serve"
},
"dependencies": {
"@department-of-veterans-affairs/css-library": "^0.0.1",
"@stencil/core": "^2.19.2",
"aria-hidden": "^1.1.3",
"body-scroll-lock": "^4.0.0-beta.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@use 'uswds-helpers/src/styles/usa-sr-only';
@use 'usa-label/src/styles/usa-label';
@import '../../mixins/accessibility.css';
@import '../../global/variables';
@import '~@department-of-veterans-affairs/css-library/dist/tokens/scss/variables.scss';

:host {
display: block;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@forward 'settings';
@use 'uswds-helpers/src/styles/usa-sr-only';
@use 'uswds-utilities/src/styles/utility-fonts.scss';
@import '../../global/variables';
@import '~@department-of-veterans-affairs/css-library/dist/tokens/scss/variables.scss';

:host :not(h3) {
font-size: 1.06 * $v3-font-base-size;
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/global/_functions.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@use 'sass:math';

@import 'variables';
@import '~@department-of-veterans-affairs/css-library/dist/tokens/scss/variables.scss';

// Uses $v3-font-base-size from _variables.scss
@function rem-override($original) {
Expand Down
102 changes: 0 additions & 102 deletions packages/web-components/src/global/_variables.scss

This file was deleted.

2 changes: 1 addition & 1 deletion packages/web-components/src/global/main.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'variables.css';
@import '~@department-of-veterans-affairs/css-library/dist/tokens/css/variables.css';
@import '../components/va-breadcrumbs/va-breadcrumbs-slot.css';
@import '../components/va-modal/va-modal-slot.css';
@import '../components/va-table/va-table-slot.css';
Expand Down
105 changes: 0 additions & 105 deletions packages/web-components/src/global/variables.css

This file was deleted.

2 changes: 1 addition & 1 deletion packages/web-components/src/mixins/uswds-error-border.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'variables';
@import '~@department-of-veterans-affairs/css-library/dist/tokens/scss/variables.scss';
@import 'functions';

:host([error]:not([error=''])[uswds]:not([uswds='false'])) {
Expand Down
4 changes: 3 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1891,6 +1891,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@department-of-veterans-affairs/component-library-monorepo@workspace:."
dependencies:
"@department-of-veterans-affairs/css-library": ^0.0.1
webpack: 5
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -1919,7 +1920,7 @@ __metadata:
languageName: unknown
linkType: soft

"@department-of-veterans-affairs/css-library@workspace:packages/css-library":
"@department-of-veterans-affairs/css-library@^0.0.1, @department-of-veterans-affairs/css-library@workspace:packages/css-library":
version: 0.0.0-use.local
resolution: "@department-of-veterans-affairs/css-library@workspace:packages/css-library"
dependencies:
Expand Down Expand Up @@ -2048,6 +2049,7 @@ __metadata:
dependencies:
"@axe-core/puppeteer": ^4.4.0
"@babel/core": ^7.12.13
"@department-of-veterans-affairs/css-library": ^0.0.1
"@department-of-veterans-affairs/formation": ^7.0.8
"@stencil/core": ^2.19.2
"@stencil/postcss": ^2.0.0
Expand Down

0 comments on commit 4c9d250

Please sign in to comment.