-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
Copy pathstyle.scss
114 lines (100 loc) · 2.26 KB
/
style.scss
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
.editor-block-types-list__list-item {
display: block;
width: 33.33%;
padding: 0 4px;
margin: 0 0 12px;
}
.editor-block-types-list__item {
display: flex;
flex-direction: column;
width: 100%;
font-size: $default-font-size;
color: $dark-gray-700;
padding: 0;
align-items: stretch;
justify-content: center;
cursor: pointer;
background: transparent;
word-break: break-word;
border-radius: $radius-round-rectangle;
border: $border-width solid transparent;
transition: all 0.05s ease-in-out;
position: relative;
&:disabled {
@include block-style__disabled();
}
&:not(:disabled) {
// Show the hover background in a pseudo selector so it can be below "stacked" icons, like Columns.
&:hover::before {
content: "";
display: block;
@include block-style__hover();
position: absolute;
z-index: -1;
border-radius: $radius-round-rectangle;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
&:hover {
.editor-block-types-list__item-icon,
.editor-block-types-list__item-title {
color: currentColor;
}
}
&:active,
&.is-active,
&:focus {
position: relative;
// Show the focus style in the icon inside instead.
outline: none;
@include block-style__focus-active();
.editor-block-types-list__item-icon,
.editor-block-types-list__item-title {
color: currentColor;
}
}
}
}
.editor-block-types-list__item-icon {
padding: 12px 20px;
border-radius: $radius-round-rectangle;
color: $dark-gray-500;
transition: all 0.05s ease-in-out;
.editor-block-icon {
margin-left: auto;
margin-right: auto;
}
svg {
transition: all 0.15s ease-out;
}
}
.editor-block-types-list__item-title {
padding: 4px 2px 8px;
}
.editor-block-types-list__item-has-children {
.editor-block-types-list__item-icon {
background: $white;
margin-right: 3px;
margin-bottom: 6px;
padding: 9px 20px 9px;
position: relative;
top: -2px;
left: -2px;
box-shadow: 0 0 0 1px $light-gray-500;
}
// Show a "stacked card" below an item that has children.
.editor-block-types-list__item-icon-stack {
display: block;
background: $white;
box-shadow: 0 0 0 1px $light-gray-500;
width: 100%;
height: 100%;
position: absolute;
z-index: -1; // Show below the card as a shadow
bottom: -6px;
right: -6px;
border-radius: 4px;
}
}