Re-organize SASS structure (#1425)

This commit is contained in:
Ismail El Korchi 2020-05-10 01:40:21 +00:00 committed by GitHub
parent 27fc314b55
commit 5c74dc9fa8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 541 additions and 515 deletions

View file

@ -0,0 +1,27 @@
/* Navigation
--------------------------------------------- */
@import "navigation/navigation";
/* Posts and pages
--------------------------------------------- */
@import "content/posts-and-pages";
/* Comments
--------------------------------------------- */
@import "comments/comments";
/* Widgets
--------------------------------------------- */
@import "widgets/widgets";
/* Media
--------------------------------------------- */
@import "media/media";
/* Captions
--------------------------------------------- */
@import "media/captions";
/* Galleries
--------------------------------------------- */
@import "media/galleries";

View file

@ -0,0 +1,7 @@
.comment-content a {
word-wrap: break-word;
}
.bypostauthor {
display: block;
}

View file

@ -0,0 +1,23 @@
.sticky {
display: block;
}
.post,
.page {
margin: 0 0 1.5em;
}
.updated:not(.published) {
display: none;
}
.page-content,
.entry-content,
.entry-summary {
margin: 1.5em 0 0;
}
.page-links {
clear: both;
margin: 0 0 1.5em;
}

View file

@ -0,0 +1,17 @@
.wp-caption {
margin-bottom: 1.5em;
max-width: 100%;
img[class*="wp-image-"] {
@include center-block;
}
.wp-caption-text {
margin: 0.8075em 0;
}
}
.wp-caption-text {
text-align: center;
}

View file

@ -0,0 +1,23 @@
.gallery {
margin-bottom: 1.5em;
display: grid;
grid-gap: 1.5em;
}
.gallery-item {
display: inline-block;
text-align: center;
width: 100%;
}
// Loops to enumerate the classes for gallery columns.
@for $i from 2 through 9 {
.gallery-columns-#{$i} {
grid-template-columns: repeat($i, 1fr);
}
}
.gallery-caption {
display: block;
}

View file

@ -0,0 +1,13 @@
.page-content .wp-smiley,
.entry-content .wp-smiley,
.comment-content .wp-smiley {
border: none;
margin-bottom: 0;
margin-top: 0;
padding: 0;
}
/* Make sure logo link wraps around logo image. */
.custom-logo-link {
display: inline-block;
}

View file

@ -0,0 +1,109 @@
.main-navigation {
display: block;
width: 100%;
ul {
display: none;
list-style: none;
margin: 0;
padding-left: 0;
ul {
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
float: left;
position: absolute;
top: 100%;
left: -999em;
z-index: 99999;
ul {
left: -999em;
top: 0;
}
li {
&:hover > ul,
&.focus > ul {
display: block;
left: auto;
}
}
a {
width: 200px;
}
:hover > a,
.focus > a {
}
a:hover,
a.focus {
}
}
li:hover > ul,
li.focus > ul {
left: auto;
}
}
li {
position: relative;
&:hover > a,
&.focus > a {
}
}
a {
display: block;
text-decoration: none;
}
.current_page_item > a,
.current-menu-item > a,
.current_page_ancestor > a,
.current-menu-ancestor > a {
}
}
/* Small menu. */
.menu-toggle,
.main-navigation.toggled ul {
display: block;
}
@media screen and (min-width: 37.5em) {
.menu-toggle {
display: none;
}
.main-navigation ul {
display: flex;
}
}
.comment-navigation,
.posts-navigation,
.post-navigation {
.site-main & {
margin: 0 0 1.5em;
}
.nav-links {
display: flex;
}
.nav-previous {
flex: 1 0 50%;
}
.nav-next {
text-align: end;
flex: 1 0 50%;
}
}

View file

@ -0,0 +1,8 @@
.widget {
margin: 0 0 1.5em;
// Make sure select elements fit in widgets.
select {
max-width: 100%;
}
}