-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
Copy pathstyle.scss
126 lines (106 loc) · 2.96 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
115
116
117
118
119
120
121
122
123
124
125
126
.editor-post-title__block {
position: relative;
padding: 5px 0;
font-size: $editor-font-size;
@include break-small() {
padding: 5px $block-side-ui-clearance;
}
.editor-post-title__input {
display: block;
width: 100%;
margin: 0;
box-shadow: none;
background: transparent;
font-family: $editor-font;
line-height: $default-line-height;
color: $dark-gray-900;
transition: border 0.1s ease-out, box-shadow 0.1s linear;
@include reduce-motion("transition");
padding: #{ $block-padding + 5px } $block-padding;
word-break: keep-all;
// Stack borders on mobile.
border: $border-width solid transparent;
border-left-width: 0;
border-right-width: 0;
border-radius: 0;
// Include transparent outline for Windows High Contrast mode.
outline: $border-width solid transparent;
@include break-small() {
border-width: $border-width;
border-left-width: 0;
}
// Match h1 heading.
font-size: 2.44em;
font-weight: 600;
// Large text needs a 3:1 contrast ratio.
&::-webkit-input-placeholder {
color: $dark-opacity-200;
}
&::-moz-placeholder {
color: $dark-opacity-200;
}
&:-ms-input-placeholder {
color: $dark-opacity-200;
}
&:focus {
border: $border-width solid transparent;
border-left-width: 0;
outline: $border-width solid transparent;
box-shadow: none;
}
}
&:not(.is-focus-mode) {
&.is-selected .editor-post-title__input {
// use opacity to work in various editor styles.
border-color: $dark-opacity-light-800;
box-shadow: inset $block-left-border-width 0 0 0 $dark-gray-500;
.is-dark-theme & {
border-color: $light-opacity-light-800;
box-shadow: inset $block-left-border-width 0 0 0 $light-gray-600;
}
// Switch to outset borders on larger screens.
@include break-small() {
box-shadow: -$block-left-border-width 0 0 0 $dark-gray-500;
.is-dark-theme & {
box-shadow: -$block-left-border-width 0 0 0 $light-gray-600;
}
}
}
}
&:not(.is-focus-mode):not(.has-fixed-toolbar):not(.is-selected) {
.editor-post-title__input:hover {
box-shadow: -$block-left-border-width 0 0 0 $dark-opacity-light-500;
.is-dark-theme & {
box-shadow: -$block-left-border-width 0 0 0 $light-opacity-light-400;
}
}
}
&.is-focus-mode .editor-post-title__input {
opacity: 0.5;
transition: opacity 0.1s linear;
@include reduce-motion("transition");
&:focus {
opacity: 1;
}
}
}
.editor-post-title .editor-post-permalink {
font-size: $default-font-size;
color: $dark-gray-900;
height: auto;
position: relative;
left: $block-left-border-width;
top: -2px;
width: calc(100% - #{$block-left-border-width});
@include break-mobile() {
position: absolute;
top: -$block-toolbar-height + $border-width + $border-width + 1px; // Shift this element upward the same height as the block toolbar, minus the border size
right: 0;
flex-wrap: nowrap;
width: auto;
}
@include break-small() {
left: $block-side-ui-clearance;
right: $block-side-ui-clearance;
}
}