Skip to content

Conversation

dchyun
Copy link
Contributor

@dchyun dchyun commented Oct 9, 2025

Description

If merged this PR would update CSS styles for font-family, font-weight font-size, and line-height to reference HDS tokens instead of hardcoded values or Vault foundational scss variables. This is done in order to ensure greater alignment with HDS, and improve the flexibility of typography styles in Vault to reflect any changes to HDS tokens.

The changes made should result in no significant visual changes. The values updated are a 1:1 match for values that were already present in HDS tokens.

Typography styles that did not align to any available HDS tokens were not migrated, and left untouched. These could be migrated in a future effort, but may result in visual changes to align with HDS.

As part of this migration, all references to the existing variables defined in the _font_variables.scss file have been replaced, so that file has been removed as well.

HDS tokens list

Below is a mapping of HDS tokens used in this migration and their corresponding values in Vault

Font family

  • SFMono-Regular - $family-monospace - --token-typography-font-stack-code
  • $family-sans - display-300-font-family - --token-typography-font-stack-text

Font weight

  • normal - 400 - $font-weight-normal - --token-typography-font-weight-regular
  • semibold - 600 - $font-weight-semibold - --token-typography-font-weight-semibold
  • bold - 700 - $font-weight-bold - --token-typography-font-weight-bold

Font size

  • 14px - --token-typography-body-200-font-size
  • ~13.7px - $size-8 - --token-typography-body-200-font-size
    • Note: This is the only change that is not a 1:1 match. In this case there will be a font-size change from 13.7px to 14px.
  • 1rem - 16px - $size-6 - --token-typography-body-300-font-size
  • 24px - $size-4 - --token-typography-display-400-font-size

Note: Any font-sizes set with sizing variable outside of those referenced above do not have an HDS equivalent and were left untouched.

Line height

  • 1.5 - --token-typography-body-300-line-height

More information on the HDS token values can be found on the HDS tokens docs page

External Links

TODO only if you're a HashiCorp employee

  • Backport Labels: If this fix needs to be backported, use the appropriate backport/ label that matches the desired release branch.
    • LTS: If this fixes a critical security vulnerability or severity 1 bug, it will also need to be backported to the current LTS versions of Vault. To ensure this, use all available enterprise labels.
  • Jira: If this change has an associated Jira, it's referenced either in the PR description, commit message, or branch name.
  • RFC: If this change has an associated RFC, please link it in the description.

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.
  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
  • If applicable, I've documented the impact of any changes to security controls.

Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

Copy link

vercel bot commented Oct 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
vault-ui Ready Ready Preview Comment Oct 17, 2025 1:09pm

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Oct 9, 2025
Copy link

github-actions bot commented Oct 9, 2025

CI Results:
All Go tests succeeded! ✅

@dchyun dchyun marked this pull request as ready for review October 9, 2025 17:55
@dchyun dchyun requested a review from a team as a code owner October 9, 2025 17:55
@dchyun dchyun temporarily deployed to community-pull-request October 16, 2025 19:00 — with GitHub Actions Inactive
@hc-github-team-secure-vault-core
Copy link
Collaborator

Copy workflow completed!

From To Skipped Merge Commits Error
hashicorp/vault#31584 hashicorp/vault-enterprise#10183 0

@dchyun dchyun force-pushed the HDS-4976/typography-hds-alignment_HDS-5060 branch from ce88a88 to b5ba570 Compare October 16, 2025 20:24
@dchyun dchyun temporarily deployed to community-pull-request October 16, 2025 20:52 — with GitHub Actions Inactive
@hc-github-team-secure-vault-core
Copy link
Collaborator

Copy pull request failed!

From To Skipped Merge Commits Error
hashicorp/vault#31584 hashicorp/vault-enterprise 0 pushing copied branch: /usr/bin/git push origin copy/hashicorp/vault/31584/HDS-4976/typography-hds-alignment_HDS-5060

To https://github.com/hashicorp/vault-enterprise.git
! [rejected] copy/hashicorp/vault/31584/HDS-4976/typography-hds-alignment_HDS-5060 -> copy/hashicorp/vault/31584/HDS-4976/typography-hds-alignment_HDS-5060 (fetch first)
error: failed to push some refs to 'https://github.com/hashicorp/vault-enterprise.git'
hint: Updates were rejected because the remote contains work that you do not
hint: have locally. This is usually caused by another repository pushing to
hint: the same ref. If you want to integrate the remote changes, use
hint: 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

: exit status 1
_Error: pushing copied branch: /usr/bin/git push origin copy/hashicorp/vault/31584/HDS-4976/typography-hds-alignment_HDS-5060

To https://github.com/hashicorp/vault-enterprise.git
! [rejected] copy/hashicorp/vault/31584/HDS-4976/typography-hds-alignment_HDS-5060 -> copy/hashicorp/vault/31584/HDS-4976/typography-hds-alignment_HDS-5060 (fetch first)
error: failed to push some refs to 'https://github.com/hashicorp/vault-enterprise.git'
hint: Updates were rejected because the remote contains work that you do not
hint: have locally. This is usually caused by another repository pushing to
hint: the same ref. If you want to integrate the remote changes, use
hint: 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

: exit status 1_

@dchyun dchyun force-pushed the HDS-4976/typography-hds-alignment_HDS-5060 branch from b5ba570 to 2904ed3 Compare October 17, 2025 13:09
@dchyun dchyun deployed to community-pull-request October 17, 2025 13:10 — with GitHub Actions Active
@hc-github-team-secure-vault-core
Copy link
Collaborator

Copy pull request failed!

From To Skipped Merge Commits Error
hashicorp/vault#31584 hashicorp/vault-enterprise 0 pushing copied branch: /usr/bin/git push origin copy/hashicorp/vault/31584/HDS-4976/typography-hds-alignment_HDS-5060

To https://github.com/hashicorp/vault-enterprise.git
! [rejected] copy/hashicorp/vault/31584/HDS-4976/typography-hds-alignment_HDS-5060 -> copy/hashicorp/vault/31584/HDS-4976/typography-hds-alignment_HDS-5060 (fetch first)
error: failed to push some refs to 'https://github.com/hashicorp/vault-enterprise.git'
hint: Updates were rejected because the remote contains work that you do not
hint: have locally. This is usually caused by another repository pushing to
hint: the same ref. If you want to integrate the remote changes, use
hint: 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

: exit status 1
_Error: pushing copied branch: /usr/bin/git push origin copy/hashicorp/vault/31584/HDS-4976/typography-hds-alignment_HDS-5060

To https://github.com/hashicorp/vault-enterprise.git
! [rejected] copy/hashicorp/vault/31584/HDS-4976/typography-hds-alignment_HDS-5060 -> copy/hashicorp/vault/31584/HDS-4976/typography-hds-alignment_HDS-5060 (fetch first)
error: failed to push some refs to 'https://github.com/hashicorp/vault-enterprise.git'
hint: Updates were rejected because the remote contains work that you do not
hint: have locally. This is usually caused by another repository pushing to
hint: the same ref. If you want to integrate the remote changes, use
hint: 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

: exit status 1_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed hds-service HDS Service pr/no-changelog pr/no-milestone ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants