-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce paragraph block CSS specificity (#13025)
* move dropcap focus to editor.css. Show hint of DC on focus * Move dropcap focus to editor.css. Reduce specificity * Easing up on paragraph block specificity.
- Loading branch information
1 parent
24dc62e
commit 27b51ba
Showing
1 changed file
with
32 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,44 @@ | ||
p { | ||
&.is-small-text { | ||
font-size: 14px; | ||
} | ||
.is-small-text { | ||
font-size: 14px; | ||
} | ||
|
||
&.is-regular-text { | ||
font-size: 16px; | ||
} | ||
.is-regular-text { | ||
font-size: 16px; | ||
} | ||
|
||
&.is-large-text { | ||
font-size: 36px; | ||
} | ||
.is-large-text { | ||
font-size: 36px; | ||
} | ||
|
||
&.is-larger-text { | ||
font-size: 48px; | ||
} | ||
.is-larger-text { | ||
font-size: 48px; | ||
} | ||
|
||
// Don't show the drop cap when editing the paragraph's content. It causes a | ||
// number of bugs in combination with `contenteditable` fields. The caret | ||
// cannot be set around it, caret position calculation fails in Chrome, and | ||
// typing at the end of the paragraph doesn't work. | ||
&.has-drop-cap:not(:focus)::first-letter { | ||
float: left; | ||
font-size: 8.4em; | ||
line-height: 0.68; | ||
font-weight: 100; | ||
margin: 0.05em 0.1em 0 0; | ||
text-transform: uppercase; | ||
font-style: normal; | ||
} | ||
// Don't show the drop cap when editing the paragraph's content. It causes a | ||
// number of bugs in combination with `contenteditable` fields. The caret | ||
// cannot be set around it, caret position calculation fails in Chrome, and | ||
// typing at the end of the paragraph doesn't work. | ||
.has-drop-cap:not(:focus)::first-letter { | ||
float: left; | ||
font-size: 8.4em; | ||
line-height: 0.68; | ||
font-weight: 100; | ||
margin: 0.05em 0.1em 0 0; | ||
text-transform: uppercase; | ||
font-style: normal; | ||
} | ||
|
||
&.has-drop-cap:not(:focus)::after { | ||
content: ""; | ||
display: table; | ||
clear: both; | ||
padding-top: $block-padding; | ||
} | ||
.has-drop-cap:not(:focus)::after { | ||
content: ""; | ||
display: table; | ||
clear: both; | ||
padding-top: $block-padding; | ||
} | ||
|
||
p.has-background { | ||
.has-background { | ||
padding: 20px 30px; | ||
} | ||
|
||
p.has-text-color a { | ||
.has-text-color a { | ||
color: inherit; | ||
} |