Skip to content

Commit

Permalink
Update entry header maintainability (fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
skysarwer committed Jan 24, 2023
1 parent e8d96ce commit 6feded3
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 44 deletions.
26 changes: 26 additions & 0 deletions sass/abstracts/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,30 @@
margin: 0 auto;
max-width: 150ch;
}
}

@mixin entry-header {
display: flex;
justify-content: center;
position: relative;
&::before {
content: '';
position: absolute;
width: 64%;
border-top: 1.5px solid $color__accent;
top: calc(50% - -2px);
height: 2em;
z-index: -1;
}

h1, h2 {
text-align: center;
font-family: $font__title;
font-size: 2.5em;
color: #000;
display: inline-block;
padding: 0 0.5em;
max-width: 15em;
background-color: $color__background-body;
}
}
23 changes: 3 additions & 20 deletions sass/css/editor/gutenberg.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,10 @@ body .edit-post-visual-editor__content-area{
background: $color__background-body;

.edit-post-visual-editor__post-title-wrapper {
display: flex;
justify-content: center;
position: relative;
&::before {
content: '';
position: absolute;
width: 64%;
border-top: 1.5px solid $color__accent;
top: calc(50% - -2px);
height: 2em;

}
@include entry-header;

h1 {
text-align: center;
font-family: $font__title;
font-size: 2.5em;
color: #000;
display: inline-block;
padding: 0 0.5em;
background-color: $color__background-body;
&::before {
z-index: 0;
}
}

Expand Down
25 changes: 1 addition & 24 deletions sass/structure/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,7 @@
}

.entry-header {
display: flex;
justify-content: center;
position: relative;
&::before {
content: '';
position: absolute;
width: 64%;
border-top: 1.5px solid $color__accent;
top: calc(50% - -2px);
height: 2em;
z-index: -1;
}
}

.entry-title,
.page-title {
text-align: center;
font-family: $font__title;
font-size: 2.5em;
color: #000;
display: inline-block;
padding: 0 0.5em;
max-width: 15em;
background-color: $color__background-body;
@include entry-header;
}

.page-links {
Expand Down

0 comments on commit 6feded3

Please sign in to comment.