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

[css-ui-4] Extend outline to include offset #10381

Open
jossmac opened this issue May 31, 2024 · 0 comments
Open

[css-ui-4] Extend outline to include offset #10381

jossmac opened this issue May 31, 2024 · 0 comments
Labels
css-ui-4 Current Work

Comments

@jossmac
Copy link

jossmac commented May 31, 2024

Proposal to extend the outline shorthand value to optionally include an outline-offset value.

The desire for this change is to simplify/improve CSS variable definitions as complete design tokens. The font shorthand property is terrific for this purpose. Borrowing from that API, a slash delimiter (/) would offer the opportunity to declare an optional offset value e.g.

/* current */
:focus  {
  outline: 3px solid black;
  outline-offset: 2px;
}

/* proposed */
:focus  {
  outline: 3px solid black / 2px;
}

Abbreviated syntax:

outline = 
  <'outline-color'> ||
  <'outline-style'> ||
  <'outline-width'>
  [ / <'outline-offset'> ]

Related:

@Loirooriol Loirooriol added the css-ui-4 Current Work label May 31, 2024
@jossmac jossmac changed the title [css-ui-4] Extend the outline shorthand value to include offset [css-ui-4] Extend outline to include offset Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-ui-4 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants