diff --git a/CHANGELOG.md b/CHANGELOG.md index 605e6fa..d6e2d2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,11 @@ # Changelog -## v0.1.19 +## v0.1.20 -### Minor updates +### Added focus interaction on focusable elements + - `/src/scss/animation.scss` + - `/src/scss/components.scss` + - `/src/scss/index.scss` ## Roadmap diff --git a/src/scss/animation.scss b/src/scss/animation.scss new file mode 100644 index 0000000..81928e9 --- /dev/null +++ b/src/scss/animation.scss @@ -0,0 +1,18 @@ +.comp-link, +.comp-button, +.comp-input, +.comp-select, +.comp-textarea { + transition: outline 0.1s ease-in-out; + outline: none; + + &:hover, + &:focus { + outline: 2px solid var(--clr-txt-base); + } +} + +.comp-link { + outline-offset: var(--s-eighth); + border-radius: var(--s-eighth); +} diff --git a/src/scss/components.scss b/src/scss/components.scss index aace531..e0a8231 100644 --- a/src/scss/components.scss +++ b/src/scss/components.scss @@ -13,16 +13,6 @@ -webkit-appearance: none; } -@mixin transition-outline { - transition: outline 0.1s ease-in-out; - outline: none; - - &:hover, - &:focus { - outline: 2px solid var(--clr-txt-base); - } -} - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Header .comp-header { @@ -145,7 +135,6 @@ cursor: pointer; border-radius: var(--s-eighth); margin-right: var(--s-eighth); - @include transition-outline; } .comp-button_panel, @@ -186,7 +175,6 @@ .comp-textarea, .comp-select { border-radius: var(--s-quarter); - @include transition-outline; &_container { max-width: 24rem; diff --git a/src/scss/index.scss b/src/scss/index.scss index 447bcc2..1dc545d 100644 --- a/src/scss/index.scss +++ b/src/scss/index.scss @@ -1,3 +1,4 @@ @use 'system' as *; @use 'components' as *; +@use 'animation' as *; @use 'twind' as *; diff --git a/static/style.css b/static/style.css index bf54415..085afa2 100644 --- a/static/style.css +++ b/static/style.css @@ -395,11 +395,6 @@ button { cursor: pointer; border-radius: var(--s-eighth); margin-right: var(--s-eighth); - transition: outline 0.1s ease-in-out; - outline: none; -} -.comp-button:hover, .comp-button:focus { - outline: 2px solid var(--clr-txt-base); } .comp-button_panel, @@ -432,15 +427,6 @@ button { .comp-textarea, .comp-select { border-radius: var(--s-quarter); - transition: outline 0.1s ease-in-out; - outline: none; -} -.comp-input:hover, .comp-input:focus, -.comp-textarea:hover, -.comp-textarea:focus, -.comp-select:hover, -.comp-select:focus { - outline: 2px solid var(--clr-txt-base); } .comp-input_container, .comp-textarea_container, @@ -563,6 +549,31 @@ button { width: max-content; } +.comp-link, +.comp-button, +.comp-input, +.comp-select, +.comp-textarea { + transition: outline 0.1s ease-in-out; + outline: none; +} +.comp-link:hover, .comp-link:focus, +.comp-button:hover, +.comp-button:focus, +.comp-input:hover, +.comp-input:focus, +.comp-select:hover, +.comp-select:focus, +.comp-textarea:hover, +.comp-textarea:focus { + outline: 2px solid var(--clr-txt-base); +} + +.comp-link { + outline-offset: var(--s-eighth); + border-radius: var(--s-eighth); +} + .h-min { height: min-content; }