Skip to content

Commit

Permalink
Prevent conflict with pdf and external link styles
Browse files Browse the repository at this point in the history
* By using :before instead of :after.
* Remove the pseudo element text in the editor.
* Only show the outline of the first link while the parent block has
focus within.
  • Loading branch information
Inwerpsel committed Apr 25, 2022
1 parent ce72341 commit 1967ee3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
12 changes: 1 addition & 11 deletions assets/src/styles/editorStyle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,12 @@
@import "editorFonts";

.is-style-expand-link {
a {
&:focus-within a {
outline: 1px dashed grey;
outline-offset: 2px;
}

a:not(:first-of-type) {
outline: 2px solid red;
}

&:before {
content: "Entirely clickable";
position: absolute;
bottom: -24px;
left: 8px;
font-size: 14px;
font-style: italic;
color: grey;
}
}
20 changes: 13 additions & 7 deletions assets/src/styles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@
.is-style-expand-link {
position: relative;

a:after {
content: "";
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
a {
&:before {
content: "";
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}

&:after {
display: none;
}
}
}

0 comments on commit 1967ee3

Please sign in to comment.