Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename font-size-base to font-size-root, add source-sans-normalized with associated utility class #3511

Merged
merged 11 commits into from
Nov 19, 2024

Conversation

powellkerry
Copy link
Contributor

@powellkerry powellkerry commented Nov 12, 2024

Update font tokens and utilities classes
see 3452

Changes:

  • Change font-size-base to font-size-root (1rem/16px)
  • Add vads-font-size-source-sans-normalized token (1.063rem/16.96px)
  • Updates utilities page (serif/sans) classes to use vads classes
  • Add .vads-u-font-size--source-sans-normalized utility class
  • Update to use css-library utilities.css

* In draft mode until css-library release, styles on the utilities page will not be displayed correctly until then.
css-library PR: department-of-veterans-affairs/component-library#1399

Copy link
Contributor

@micahchiang micahchiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left comments on what needs to stay the same.

src/_data/tokens/vads.tokens.json Show resolved Hide resolved
src/_data/tokens/vads-font-semantic.csv Show resolved Hide resolved
src/_data/tokens/vads-font-primitive.csv Outdated Show resolved Hide resolved
Comment on lines 20 to 27
gulp.task('copy-css-library', function (done) {
console.log('copying web-components CSS');
var stream = gulp.src('./node_modules/@department-of-veterans-affairs/css-library/dist/stylesheets/*.css')
.pipe(gulp.dest('src/assets/stylesheets/'));

return stream;
});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this is needed, could you explain? 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to copy stylesheets into the documentation site from css-library. This is the way that it is done for both formation and web-components. This allows the utilites.css file to be included in the head so that the /foundation/utilities/font-size page will render the correct styles using the utility classes.

Currently on this page, none of the font-families are being applied. This is why I wanted to get a patch in before we take on the larger effort of replacing formation on the entire site.

src/_foundation/utilities/html/font-size.html Outdated Show resolved Hide resolved
@powellkerry powellkerry marked this pull request as ready for review November 18, 2024 20:49
@powellkerry powellkerry requested a review from a team as a code owner November 18, 2024 20:49
Copy link
Contributor

@micahchiang micahchiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes look good to me, thanks Kerry!

Comment on lines +20 to +27
gulp.task('copy-css-library-css', function (done) {
console.log('copying css-library CSS');
var stream = gulp.src('./node_modules/@department-of-veterans-affairs/css-library/dist/stylesheets/*.css')
.pipe(gulp.dest('src/assets/stylesheets/'));

return stream;
});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed to actually get css-library styles working on the doc site?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed to load stylesheets from the css-library on the docs site, currently we are only adding the utilities.css file. We may want to investigate if there is a better solution when we remove formation. Seems like there should be a better way to use module stylesheets in jekyll html templates.

@powellkerry powellkerry merged commit 78cc7f2 into main Nov 19, 2024
4 checks passed
@powellkerry powellkerry deleted the 3452-font-token-update branch November 19, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants