summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/_scopes.scss3
-rw-r--r--src/scopes/_invisible-links.scss32
-rw-r--r--src/scopes/_links.scss (renamed from src/scopes/_colored-links.scss)36
-rw-r--r--tpl/index.pug4
-rw-r--r--tpl/objects/bubble.pug2
-rw-r--r--tpl/objects/lightbox.pug2
-rw-r--r--tpl/views/colored-links.pug9
-rw-r--r--tpl/views/links.pug25
8 files changed, 55 insertions, 58 deletions
diff --git a/src/_scopes.scss b/src/_scopes.scss
index abfb6a0..a3aeb6c 100644
--- a/src/_scopes.scss
+++ b/src/_scopes.scss
@@ -1,5 +1,4 @@
1@use 'scopes/colored-links'; 1@use 'scopes/links';
2@use 'scopes/invisible-links';
3@use 'scopes/code'; 2@use 'scopes/code';
4@use 'scopes/blockquotes'; 3@use 'scopes/blockquotes';
5@use 'scopes/lists'; 4@use 'scopes/lists';
diff --git a/src/scopes/_invisible-links.scss b/src/scopes/_invisible-links.scss
deleted file mode 100644
index 32e8e7c..0000000
--- a/src/scopes/_invisible-links.scss
+++ /dev/null
@@ -1,32 +0,0 @@
1@use 'iro-sass/src/index' as iro;
2@use '../functions' as fn;
3
4@include iro.props-namespace('invisible-links') {
5 @include iro.props-store((
6 --colors: (
7 --key-focus: (
8 --border: fn.global-color(--focus --fill),
9 --shadow: 0 0 0 calc(fn.global-dim(--focus --outline-width) + 2px) fn.global-color(--accent --primary --quiet --bg),
10 ),
11 )
12 ), 'colors');
13
14 @include iro.bem-scope(iro.props-namespace()) {
15 :link,
16 :visited {
17 border-radius: .5px;
18 color: currentColor;
19 text-decoration: none;
20
21 &:hover {
22 text-decoration: underline;
23 }
24
25 @include iro.bem-at-theme('keyboard') {
26 &:focus {
27 box-shadow: 0 0 0 2px fn.color(--key-focus --border), fn.color(--key-focus --shadow);
28 }
29 }
30 }
31 }
32}
diff --git a/src/scopes/_colored-links.scss b/src/scopes/_links.scss
index 15614ba..4d9e571 100644
--- a/src/scopes/_colored-links.scss
+++ b/src/scopes/_links.scss
@@ -1,11 +1,12 @@
1@use 'iro-sass/src/index' as iro; 1@use 'iro-sass/src/index' as iro;
2@use '../functions' as fn; 2@use '../functions' as fn;
3 3
4@include iro.props-namespace('colored-links') { 4@include iro.props-namespace('links') {
5 @include iro.props-store(( 5 @include iro.props-store((
6 --colors: ( 6 --colors: (
7 --idle: fn.global-color(--accent --link-idle --quiet --fg), 7 --idle: fn.global-color(--accent --link-idle --quiet --fg),
8 --visited: fn.global-color(--accent --link-visited --quiet --fg), 8 --visited: fn.global-color(--accent --link-visited --quiet --fg),
9
9 --key-focus: ( 10 --key-focus: (
10 --border: fn.global-color(--focus --fill), 11 --border: fn.global-color(--focus --fill),
11 --shadow: 0 0 0 calc(fn.global-dim(--focus --outline-width) + 2px) fn.global-color(--accent --primary --quiet --obj-lo), 12 --shadow: 0 0 0 calc(fn.global-dim(--focus --outline-width) + 2px) fn.global-color(--accent --primary --quiet --obj-lo),
@@ -14,19 +15,15 @@
14 ), 'colors'); 15 ), 'colors');
15 16
16 @include iro.bem-scope(iro.props-namespace()) { 17 @include iro.bem-scope(iro.props-namespace()) {
17 :link { 18 :link,
18 color: fn.color(--idle);
19 text-decoration: underline;
20 }
21
22 :visited { 19 :visited {
23 color: fn.color(--visited); 20 border-radius: .5px;
21 color: currentColor;
24 text-decoration: underline; 22 text-decoration: underline;
25 }
26 23
27 :link, 24 &:hover {
28 :visited { 25 text-decoration: underline;
29 border-radius: .5px; 26 }
30 27
31 @include iro.bem-at-theme('keyboard') { 28 @include iro.bem-at-theme('keyboard') {
32 &:focus { 29 &:focus {
@@ -34,5 +31,22 @@
34 } 31 }
35 } 32 }
36 } 33 }
34
35 @include iro.bem-modifier('invisible') {
36 :link,
37 :visited {
38 text-decoration: none;
39 }
40 }
41
42 @include iro.bem-modifier('colored') {
43 :link {
44 color: fn.color(--idle);
45 }
46
47 :visited {
48 color: fn.color(--visited);
49 }
50 }
37 } 51 }
38} 52}
diff --git a/tpl/index.pug b/tpl/index.pug
index 0bafbc9..d87fec8 100644
--- a/tpl/index.pug
+++ b/tpl/index.pug
@@ -53,7 +53,7 @@ mixin user-card(name, hue)
53 53
54include views/heading.pug 54include views/heading.pug
55include views/divider.pug 55include views/divider.pug
56include views/colored-links.pug 56include views/links.pug
57include views/code.pug 57include views/code.pug
58include views/blockquote.pug 58include views/blockquote.pug
59include views/list.pug 59include views/list.pug
@@ -96,7 +96,7 @@ html
96 .c-content.l-overflow 96 .c-content.l-overflow
97 +view-heading 97 +view-heading
98 +view-divider 98 +view-divider
99 +view-colored-links 99 +view-links
100 +view-code 100 +view-code
101 +view-blockquote 101 +view-blockquote
102 +view-list 102 +view-list
diff --git a/tpl/objects/bubble.pug b/tpl/objects/bubble.pug
index 8d878c8..5782ca5 100644
--- a/tpl/objects/bubble.pug
+++ b/tpl/objects/bubble.pug
@@ -32,7 +32,7 @@ mixin bubble(user)
32 else if user 32 else if user
33 header(class=headerClasses) 33 header(class=headerClasses)
34 strong= user 34 strong= user
35 span.s-colored-links 35 span.s-links.s-links--colored
36 - slots.body() 36 - slots.body()
37 if slots.time 37 if slots.time
38 small.o-bubble__time 38 small.o-bubble__time
diff --git a/tpl/objects/lightbox.pug b/tpl/objects/lightbox.pug
index ac7d886..7298ed9 100644
--- a/tpl/objects/lightbox.pug
+++ b/tpl/objects/lightbox.pug
@@ -3,7 +3,7 @@ include icon.pug
3mixin lightbox(images) 3mixin lightbox(images)
4 .o-lightbox 4 .o-lightbox
5 header.o-lightbox__header 5 header.o-lightbox__header
6 .s-colored-links 6 .s-links.s-links--colored
7 block 7 block
8 +action-button(round=true quiet=true icon='x' class='o-lightbox__close-btn') 8 +action-button(round=true quiet=true icon='x' class='o-lightbox__close-btn')
9 img.o-lightbox__img(src=images[0]) 9 img.o-lightbox__img(src=images[0])
diff --git a/tpl/views/colored-links.pug b/tpl/views/colored-links.pug
deleted file mode 100644
index 8951154..0000000
--- a/tpl/views/colored-links.pug
+++ /dev/null
@@ -1,9 +0,0 @@
1mixin view-colored-links
2 +view('colored-links', 'Colored links')
3 .c-box
4 .s-colored-links
5 = 'Lorem ipsum dolor '
6 a(href='https://mk.vulpes.one/')= 'https://mk.vulpes.one/'
7 = ' sit amet, consetetur '
8 a(href='https://v.reddit.com/')= 'https://v.reddit.com/'
9 = ' sadipscing elitr, sed diam nonumy eirmod tempor'
diff --git a/tpl/views/links.pug b/tpl/views/links.pug
new file mode 100644
index 0000000..91d6dde
--- /dev/null
+++ b/tpl/views/links.pug
@@ -0,0 +1,25 @@
1mixin view-links
2 +view('links', 'Links')
3 .c-box
4 .s-links
5 = 'Lorem ipsum dolor '
6 a(href='https://mk.vulpes.one/')= 'https://mk.vulpes.one/'
7 = ' sit amet, consetetur '
8 a(href='https://v.reddit.com/')= 'https://v.reddit.com/'
9 = ' sadipscing elitr, sed diam nonumy eirmod tempor'
10
11 .c-box
12 .s-links.s-links--invisible
13 = 'Lorem ipsum dolor '
14 a(href='https://mk.vulpes.one/')= 'https://mk.vulpes.one/'
15 = ' sit amet, consetetur '
16 a(href='https://v.reddit.com/')= 'https://v.reddit.com/'
17 = ' sadipscing elitr, sed diam nonumy eirmod tempor'
18
19 .c-box
20 .s-links.s-links--colored
21 = 'Lorem ipsum dolor '
22 a(href='https://mk.vulpes.one/')= 'https://mk.vulpes.one/'
23 = ' sit amet, consetetur '
24 a(href='https://v.reddit.com/')= 'https://v.reddit.com/'
25 = ' sadipscing elitr, sed diam nonumy eirmod tempor'