summaryrefslogtreecommitdiffstats
path: root/src/styles/components/_logo.scss
blob: 345081761e490881d3ca697755bc07d8a6a96770 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@use "sass:map";
@use "sass:string";

@use "pkg:iro-sass/bem";
@use "pkg:iro-sass/props";
@use "pkg:iro-design" as iro;

@mixin styles {
	@include bem.component("logo") {
		display: block;
		padding: props.get(iro.$core--size--50);
		margin-inline: calc(-1 * props.get(iro.$core--size--50));
		border-radius: props.get(iro.$s-links--rounding);
		color: props.get(iro.$core--theme, --heading);

		&:link,
		&:visited {
			&:hover {
				text-decoration: none;
				color: props.get(iro.$core--theme, --text-mute);
			}

			&:focus-visible {
				color: props.get(iro.$s-links--key-focus--text-color);
				text-decoration: none;
				outline: props.get(iro.$s-links--key-focus--border-color) solid
					props.get(iro.$s-links--key-focus--border-width);
				box-shadow: 0 0 0
					calc(
						props.get(iro.$s-links--key-focus--border-width) +
							props.get(iro.$s-links--key-focus--outline-width)
					)
					props.get(iro.$s-links--key-focus--outline-color);
			}
		}

		@include bem.elem("img") {
			display: block;
			block-size: 1.7em;
			aspect-ratio: 2700 / 600;
		}

		@include bem.modifier("sm") {
			@include bem.elem("img") {
				aspect-ratio: 600 / 600;
			}
		}

		@include bem.modifier("lg") {
			@include bem.elem("img") {
				block-size: 2em;
			}
		}

		@each $theme in map.keys(props.get(iro.$core--transparent-colors)) {
			$logo-theme: static-#{string.slice($theme, 3)};

			@include bem.modifier($logo-theme) {
				color: props.get(iro.$core--transparent-colors, $theme, --900);

				&:link,
				&:visited {
					&:hover {
						color: props.get(iro.$core--transparent-colors, $theme, --800);
					}

					&:focus-visible {
						color: props.get(iro.$core--transparent-colors, $theme, --900);
						outline-color: props.get(iro.$core--transparent-colors, $theme, --900);
						box-shadow: 0 0 0
							calc(
								props.get(iro.$s-links--key-focus--border-width) +
									props.get(iro.$s-links--key-focus--outline-width)
							)
							props.get(iro.$core--transparent-colors, $theme, --300);
					}
				}
			}
		}
	}
}