diff options
author | Volpeon <git@volpeon.ink> | 2022-06-11 16:37:42 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2022-06-11 16:37:42 +0200 |
commit | 806942ea39ec6223894e2f6714e596e3d4b1ccf2 (patch) | |
tree | 672d20f1bccfff75504035c7750e7b932bfb91a3 /src | |
parent | Added list styles (diff) | |
download | iro-design-806942ea39ec6223894e2f6714e596e3d4b1ccf2.tar.gz iro-design-806942ea39ec6223894e2f6714e596e3d4b1ccf2.tar.bz2 iro-design-806942ea39ec6223894e2f6714e596e3d4b1ccf2.zip |
Added focus style for links
Diffstat (limited to 'src')
-rw-r--r-- | src/scopes/_colored-links.scss | 28 | ||||
-rw-r--r-- | src/scopes/_invisible-links.scss | 19 |
2 files changed, 41 insertions, 6 deletions
diff --git a/src/scopes/_colored-links.scss b/src/scopes/_colored-links.scss index d44dffc..4451cdc 100644 --- a/src/scopes/_colored-links.scss +++ b/src/scopes/_colored-links.scss | |||
@@ -4,22 +4,38 @@ | |||
4 | @include iro.props-namespace('colored-links') { | 4 | @include iro.props-namespace('colored-links') { |
5 | @include iro.props-store(( | 5 | @include iro.props-store(( |
6 | --colors: ( | 6 | --colors: ( |
7 | --link: ( | 7 | --idle: fn.global-color(--accent --link-idle --obj-lo), |
8 | --idle: fn.global-color(--accent --link-idle --obj-lo), | 8 | --visited: fn.global-color(--accent --link-visited --obj-lo), |
9 | --visited: fn.global-color(--accent --link-visited --obj-lo), | 9 | --key-focus: ( |
10 | ) | 10 | --border: fn.global-color(--focus --fill), |
11 | --shadow: fn.global-color(--focus --shadow), | ||
12 | ), | ||
11 | ) | 13 | ) |
12 | ), 'colors'); | 14 | ), 'colors'); |
13 | 15 | ||
14 | @include iro.bem-scope(iro.props-namespace()) { | 16 | @include iro.bem-scope(iro.props-namespace()) { |
15 | :link { | 17 | :link { |
16 | color: fn.color(--link --idle); | 18 | color: fn.color(--idle); |
17 | text-decoration: underline; | 19 | text-decoration: underline; |
18 | } | 20 | } |
19 | 21 | ||
20 | :visited { | 22 | :visited { |
21 | color: fn.color(--link --visited); | 23 | color: fn.color(--visited); |
22 | text-decoration: underline; | 24 | text-decoration: underline; |
23 | } | 25 | } |
26 | |||
27 | :link, | ||
28 | :visited { | ||
29 | margin: -2px; | ||
30 | border: 2px solid transparent; | ||
31 | border-radius: 2px; | ||
32 | |||
33 | @include iro.bem-at-theme('keyboard') { | ||
34 | &:focus { | ||
35 | border-color: fn.color(--key-focus --border); | ||
36 | box-shadow: fn.color(--key-focus --shadow); | ||
37 | } | ||
38 | } | ||
39 | } | ||
24 | } | 40 | } |
25 | } | 41 | } |
diff --git a/src/scopes/_invisible-links.scss b/src/scopes/_invisible-links.scss index 71dd9da..d02bc5f 100644 --- a/src/scopes/_invisible-links.scss +++ b/src/scopes/_invisible-links.scss | |||
@@ -1,15 +1,34 @@ | |||
1 | @use 'iro-sass/src/index' as iro; | 1 | @use 'iro-sass/src/index' as iro; |
2 | 2 | ||
3 | @include iro.props-namespace('invisible-links') { | 3 | @include iro.props-namespace('invisible-links') { |
4 | @include iro.props-store(( | ||
5 | --colors: ( | ||
6 | --key-focus: ( | ||
7 | --border: fn.global-color(--focus --fill), | ||
8 | --shadow: fn.global-color(--focus --shadow), | ||
9 | ), | ||
10 | ) | ||
11 | ), 'colors'); | ||
12 | |||
4 | @include iro.bem-scope(iro.props-namespace()) { | 13 | @include iro.bem-scope(iro.props-namespace()) { |
5 | :link, | 14 | :link, |
6 | :visited { | 15 | :visited { |
16 | margin: -2px; | ||
17 | border: 2px solid transparent; | ||
18 | border-radius: 2px; | ||
7 | color: currentColor; | 19 | color: currentColor; |
8 | text-decoration: none; | 20 | text-decoration: none; |
9 | 21 | ||
10 | &:hover { | 22 | &:hover { |
11 | text-decoration: underline; | 23 | text-decoration: underline; |
12 | } | 24 | } |
25 | |||
26 | @include iro.bem-at-theme('keyboard') { | ||
27 | &:focus { | ||
28 | border-color: fn.color(--key-focus --border); | ||
29 | box-shadow: fn.color(--key-focus --shadow); | ||
30 | } | ||
31 | } | ||
13 | } | 32 | } |
14 | } | 33 | } |
15 | } | 34 | } |