Skip to content

Commit 4591525

Browse files
authored
[feature] display icon or letter on link tile
1 parent b338342 commit 4591525

37 files changed

Lines changed: 21075 additions & 429 deletions

css/auto-suggest.css

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
.auto-suggest {
2+
position: relative;
3+
z-index: 1;
4+
font-size: 1em;
5+
}
6+
7+
.auto-suggest-list {
8+
background-color: rgb(var(--gray-02));
9+
margin-top: 0.5em;
10+
padding: 1em;
11+
position: absolute;
12+
top: 0;
13+
left: 0;
14+
width: 100%;
15+
max-height: 40vh;
16+
border-radius: var(--radius);
17+
overflow-y: auto;
18+
z-index: var(--z-index-auto-suggest-list);
19+
display: flex;
20+
flex-direction: row;
21+
flex-wrap: wrap;
22+
box-shadow: var(--shadow-large);
23+
}
24+
25+
.auto-suggest-list-item {
26+
flex-basis: 33.3333333333%;
27+
}
28+
29+
.auto-suggest-list-item:not(:last-child) {
30+
margin-bottom: 0;
31+
}
32+
33+
.auto-suggest-link {
34+
padding: 0.5em;
35+
border-width: var(--form-input-border);
36+
border-style: solid;
37+
border-color: transparent;
38+
border-radius: var(--radius);
39+
width: 100%;
40+
height: 100%;
41+
display: flex;
42+
flex-direction: column;
43+
justify-content: flex-start;
44+
align-items: center;
45+
transition: background-color var(--animation-speed-fast) ease-in-out, color var(--animation-speed-fast) ease-in-out, border-color var(--animation-speed-fast) ease-in-out, box-shadow var(--animation-speed-fast) ease-in-out;
46+
}
47+
48+
.auto-suggest-link:link,
49+
.auto-suggest-link:visited {
50+
color: rgb(var(--gray-16));
51+
text-decoration: none;
52+
}
53+
54+
.auto-suggest-link:hover {
55+
background-color: rgb(var(--gray-03));
56+
color: rgb(var(--form-input-text-hover));
57+
outline: none;
58+
text-decoration: none;
59+
box-shadow: 0 0 0 var(--line-width) rgb(var(--gray-06));
60+
}
61+
62+
.auto-suggest-link:focus {
63+
background-color: rgb(var(--gray-01));
64+
color: rgb(var(--form-input-text-focus));
65+
outline: none;
66+
text-decoration: none;
67+
box-shadow: 0 0 0 var(--line-width) rgb(var(--accent)), 0 0 0 calc(var(--line-width) * 2) rgba(var(--accent), 0.25);
68+
}
69+
70+
.auto-suggest-link:active {
71+
color: rgb(var(--style-neutral-text));
72+
}
73+
74+
.auto-suggest-icon {
75+
font-size: 2em;
76+
}
77+
78+
.auto-suggest-icon-text {
79+
color: rgb(var(--gray-08));
80+
margin-top: 0.5em;
81+
font-size: 0.6em;
82+
text-align: center;
83+
}

css/base.css

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@
3030
--button-link-text-active: var(--gray-18);
3131
--button-link-text-disabled: var(--gray-04);
3232
--form-input-text: var(--gray-16);
33+
--form-input-border: 2;
3334
--form-input-text-hover: var(--style-neutral-text);
3435
--form-input-text-focus: var(--style-neutral-text);
35-
--form-input-text-disabled: var(--gray-04);
36+
--form-input-text-disabled: var(--gray-02);
3637
--form-input-text-disabled-helper-text: var(--gray-04);
3738
--form-input-placeholder: var(--gray-06);
3839
--form-input-placeholder-hover-focus: var(--gray-10);
3940
--form-input-placeholder-disabled: var(--gray-04);
40-
--form-label: var(--gray-16);
41+
--form-label: var(--gray-12);
4142
--form-label-disabled: var(--gray-04);
4243
--form-checkbox-radio-label: var(--gray-12);
4344
--form-checkbox-radio-chcked-label: var(--gray-16);
@@ -64,6 +65,7 @@
6465
--z-index-shade: 6000;
6566
--z-index-modal: 7000;
6667
--z-index-menu: 8000;
68+
--z-index-auto-suggest-list: 8000;
6769
--header-shade-color: transparent;
6870
--header-shade-opacity: none;
6971
--header-height: 0;
@@ -84,6 +86,12 @@
8486
--layout-width-gutter: var(--gutter) * 8;
8587
--menu-border-width: 2px;
8688
--menu-border: var(--menu-border-width) solid rgb(var(--gray-02));
89+
--shadow-small: 0 2px 1px rgba(0, 0, 0, 0.1), 0 3px 2px rgba(0, 0, 0, 0.1);
90+
--shadow-medium: 0 4px 10px rgba(0, 0, 0, 0.1), 0 6px 15px rgba(0, 0, 0, 0.1);
91+
--shadow-large: 0 4px 10px rgba(0, 0, 0, 0.1), 0 6px 30px rgba(0, 0, 0, 0.1);
92+
--shadow-small-inset: inset 0 1px 1px rgba(0, 0, 0, 0.05);
93+
--shadow-medium-inset: inset 0 2px 2px rgba(0, 0, 0, 0.1);
94+
--shadow-large-inset: inset 0 3px 3px rgba(0, 0, 0, 0.15);
8795
/* breakpoint reference */
8896
/* can not be used in @media as of yet */
8997
--breakpoint-sm: 550px;
@@ -136,10 +144,6 @@ body {
136144
transition: background-color var(--animation-speed-fast) ease-in-out;
137145
}
138146

139-
.is-menu-open body {
140-
overflow: hidden;
141-
}
142-
143147
.is-header-alignment-vertical-top body {
144148
justify-content: flex-start;
145149
}

0 commit comments

Comments
 (0)