Skip to content

Commit

Permalink
💄 Tweak focus styles for consistent outlines
Browse files Browse the repository at this point in the history
* Firefox applies the Ubuntu color theme (on Ubuntu), while on Arch/
  Fedora it has a blue outline. This does not have sufficient contrast
  with the blue from the button itself.
* Chromium-based browsers apply a black outline, so we settled on this
  color.
  • Loading branch information
sergei-maertens committed Nov 1, 2023
1 parent bb0237a commit 69ac09d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@open-formulieren/design-tokens",
"version": "0.45.0",
"version": "0.45.1",
"description": "Design tokens for Open Forms",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
20 changes: 9 additions & 11 deletions src/community/utrecht/button.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"padding-inline-end": {"value": "12px"},

"focus": {
"border-color": {"value": "{of.color.focus.border}"}
"border-color": {"value": "transparent"}
},

"hover": {
Expand Down Expand Up @@ -49,7 +49,7 @@
},

"focus": {
"border-color": {"value": "#000000"}
"border-color": {"value": "transparent"}
},

"danger": {
Expand All @@ -70,7 +70,7 @@
},

"focus": {
"border-color": {"value": "#000000"}
"border-color": {"value": "transparent"}
}
}
},
Expand All @@ -79,17 +79,15 @@
"border-color": {"value": "#5e5e5e"},

"focus": {
"border-color": {"value": "{of.color.focus.border}"}
"border-color": {"value": "transparent"}
},

"danger": {
"background": {
"color": {
"value": "{of.color.danger}"
}
},
"color": {
"value": "#fce9e8"
"background-color": {"value": "{of.color.danger}"},
"color": {"value": "#fce9e8"},

"focus": {
"border-color": {"value": "transparent"}
}
}
},
Expand Down
7 changes: 4 additions & 3 deletions src/community/utrecht/focus.tokens.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"utrecht": {
"focus": {
"outline-width": {"value": "2px"},
"outline-color": {},
"outline-style": {"value": "solid"}
"outline-color": {"value": "#000"},
"outline-offset": {"value": "0"},
"outline-style": {"value": "solid"},
"outline-width": {"value": "2px"}
}
}
}

0 comments on commit 69ac09d

Please sign in to comment.