architecture globale revisitée (_vendor, _config, _library, components)

This commit is contained in:
Raphael Goetter 2017-07-31 10:36:32 +02:00
parent f5f95fe9ac
commit 0ebe24ed0f
18 changed files with 260 additions and 259 deletions

241
sass/_library/_base.scss Normal file
View file

@ -0,0 +1,241 @@
/* ----------------------------- */
/* ==Base (basic styles) */
/* ----------------------------- */
/* switching to border-box model for all elements */
html {
box-sizing: border-box;
}
* {
box-sizing: inherit;
}
html {
/* set base font-size to equiv "10px", which is adapted to rem unit */
font-size: 62.5%;
/* IE9-IE11 math fixing. See http://bit.ly/1g4X0bX */
/* thanks to @guardian, @victorbritopro and @eQRoeil */
font-size: calc(1em * 0.625);
}
body {
font-size: $base-font-size;
@if variable_exists(base-font-size-l) and $base-font-size-l != $base-font-size {
@include respond-to("tiny-up") {
font-size: $base-font-size-l;
}
}
background-color: $background-base;
color: $color-base;
font-family: $font-stack-common;
line-height: $line-height;
@if variable_exists(line-height-l) and $line-height-l != $line-height {
@include respond-to("tiny-up") {
line-height: $line-height-l;
}
}
}
a {
color: $color-link;
// No styling on focus/hover if there's no effect. Avoids to then have to
// override it countless times. See Issue #232
@if variable_exists(color-link-hover) and
( null == index( ($color-link, null, false), $color-link-hover) ) {
&:focus,
&:hover,
&:active {
color: $color-link-hover;
}
}
}
ul,
ol {
padding-left: 2em;
}
img {
vertical-align: middle;
}
blockquote,
figure {
margin-left: 0;
margin-right: 0;
}
/* font-sizing for content */
p,
.#{$kna-namespace}p-like,
ul,
ol,
dl,
blockquote,
pre,
td,
th,
label,
textarea,
caption,
details,
figure {
margin-top: 0.75em;
margin-bottom: 0;
line-height: $line-height;
}
h1, .#{$kna-namespace}h1-like {
font-size: $h1-size;
@if variable_exists(h1-size-l) and $h1-size-l != $h1-size {
@include respond-to("tiny-up") {
font-size: $h1-size-l;
}
}
@if variable_exists(font-stack-headings) and $font-stack-headings != $font-stack-common {
font-family: $font-stack-headings;
}
}
h2, .#{$kna-namespace}h2-like {
font-size: $h2-size;
@if variable_exists(h2-size-l) and $h2-size-l != $h2-size {
@include respond-to("tiny-up") {
font-size: $h2-size-l;
}
}
@if variable_exists(font-stack-headings) and $font-stack-headings != $font-stack-common {
font-family: $font-stack-headings;
}
}
h3, .#{$kna-namespace}h3-like {
font-size: $h3-size;
@if variable_exists(h3-size-l) and $h3-size-l != $h3-size {
@include respond-to("tiny-up") {
font-size: $h3-size-l;
}
}
}
h4, .#{$kna-namespace}h4-like {
font-size: $h4-size;
@if variable_exists(h4-size-l) and $h4-size-l != $h4-size {
@include respond-to("tiny-up") {
font-size: $h4-size-l;
}
}
}
h5, .#{$kna-namespace}h5-like {
font-size: $h5-size;
@if variable_exists(h5-size-l) and $h5-size-l != $h5-size {
@include respond-to("tiny-up") {
font-size: $h5-size-l;
}
}
}
h6, .#{$kna-namespace}h6-like {
font-size: $h6-size;
@if variable_exists(h6-size-l) and $h6-size-l != $h6-size {
@include respond-to("tiny-up") {
font-size: $h6-size-l;
}
}
}
/* alternate font-sizing */
.#{$kna-namespace}smaller {
font-size: 0.6em;
}
.#{$kna-namespace}small {
font-size: 0.8em;
}
.#{$kna-namespace}big {
font-size: 1.2em;
}
.#{$kna-namespace}bigger {
font-size: 1.5em;
}
.#{$kna-namespace}biggest {
font-size: 2em;
}
code,
pre,
samp,
kbd {
/* IE fix */
white-space: pre-line;
white-space: pre-wrap;
font-family: $font-stack-monospace;
line-height: normal;
}
em,
.#{$kna-namespace}italic,
address,
cite,
i,
var {
font-style: italic;
}
/* avoid top margins on first content element */
p,
.#{$kna-namespace}p-like,
ul,
ol,
dl,
blockquote,
pre,
h1,
.#{$kna-namespace}h1-like,
h2,
.#{$kna-namespace}h2-like,
h3,
.#{$kna-namespace}h3-like,
h4,
.#{$kna-namespace}h4-like,
h5,
.#{$kna-namespace}h5-like,
h6,
.#{$kna-namespace}h6-like {
&:first-child {
margin-top: 0;
}
}
/* avoid margins on nested elements */
li p,
li .#{$kna-namespace}p-like,
li ul,
li ol {
margin-top: 0;
margin-bottom: 0;
}
/* max values */
img,
table,
td,
blockquote,
code,
pre,
textarea,
input,
video,
svg {
max-width: 100%;
}
img {
height: auto;
}

126
sass/_library/_layout.scss Normal file
View file

@ -0,0 +1,126 @@
/* ----------------------------- */
/* ==Global Layout */
/* ----------------------------- */
/* module, gains superpower "BFC" Block Formating Context */
.mod,
.bfc {
overflow: hidden;
}
/* blocks that needs to be placed under floats */
.clear {
clear: both;
}
/* blocks that must contain floats */
.clearfix {
&::after {
content: "";
display: table;
clear: both;
border-collapse: collapse;
}
}
/* simple blocks alignment */
.#{$kna-namespace}left {
margin-right: auto;
}
.#{$kna-namespace}right {
margin-left: auto;
}
.#{$kna-namespace}center {
margin-left: auto;
margin-right: auto;
}
/* text and contents alignment */
.#{$kna-namespace}txtleft {
text-align: left;
}
.#{$kna-namespace}txtright {
text-align: right;
}
.#{$kna-namespace}txtcenter {
text-align: center;
}
/* floating elements */
.#{$kna-namespace}fl {
float: left;
}
img.#{$kna-namespace}fl {
margin-right: $small-value;
}
.#{$kna-namespace}fr {
float: right;
}
img.#{$kna-namespace}fr {
margin-left: $small-value;
}
img.#{$kna-namespace}fl,
img.#{$kna-namespace}fr {
margin-bottom: $tiny-value;
}
/* inline-block */
.#{$kna-namespace}inbl {
display: inline-block;
vertical-align: top;
}
/* flexbox layout
http://www.alsacreations.com/tuto/lire/1493-css3-flexbox-layout-module.html
*/
[class*="#{$kna-namespace}flex-container"],
.#{$kna-namespace}flex-container,
.d-flex {
display: flex;
flex-wrap: wrap;
}
.#{$kna-namespace}flex-container-h,
.flex-row {
flex-direction: row;
}
.#{$kna-namespace}flex-container-v,
.flex-column {
flex-direction: column;
}
.#{$kna-namespace}flex-item-fluid {
flex: 1;
min-width: 0;
}
.#{$kna-namespace}flex-item-first,
.#{$kna-namespace}item-first {
order: -1;
}
.#{$kna-namespace}flex-item-medium,
.#{$kna-namespace}item-medium {
order: 0;
}
.#{$kna-namespace}flex-item-last,
.#{$kna-namespace}item-last {
order: 1;
}
.#{$kna-namespace}flex-item-center,
.#{$kna-namespace}item-center,
.mr-auto {
margin: auto;
}

55
sass/_library/_misc.scss Normal file
View file

@ -0,0 +1,55 @@
/* ----------------------------- */
/* ==Misc (skip links, hyphens) */
/* ----------------------------- */
/* styling skip links */
.#{$kna-namespace}skip-links {
position: absolute;
& a {
position: absolute;
overflow: hidden;
clip: rect(1px, 1px, 1px, 1px);
padding: 0.5em;
background: black;
color: white;
text-decoration: none;
&:focus {
position: static;
overflow: visible;
clip: auto;
}
}
}
// hyphens on tiny screens
@media (max-width: ($small - 1)) {
/* you shall not pass */
div,
textarea,
table,
td,
th,
code,
pre,
samp {
word-wrap: break-word;
hyphens: auto;
}
}
// use .no-wrapping to disallow hyphens on tiny screens
@media (max-width: ($small - 1)) {
.no-wrapping {
word-wrap: normal;
hyphens: manual;
}
}
// SVG width IE fix
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
img[src$=".svg"] {
width: 100%;
}
}

97
sass/_library/_print.scss Normal file
View file

@ -0,0 +1,97 @@
/* ----------------------------- */
/* ==Print (quick print reset) */
/* ----------------------------- */
@media print {
* {
background: transparent !important;
box-shadow: none !important;
text-shadow: none !important;
}
body {
width: auto;
margin: auto;
font-family: serif;
font-size: 12pt;
}
p,
.#{$kna-namespace}p-like,
h1,
.#{$kna-namespace}h1-like,
h2,
.#{$kna-namespace}h2-like,
h3,
.#{$kna-namespace}h3-like,
h4,
.#{$kna-namespace}h4-like,
h5,
.#{$kna-namespace}h5-like,
h6,
.#{$kna-namespace}h6-like,
blockquote,
ul,
ol {
color: #000;
margin: auto;
}
.#{$kna-namespace}print {
display: block;
}
.#{$kna-namespace}no-print {
display: none;
}
/* no orphans, no widows */
p,
.#{$kna-namespace}p-like,
blockquote {
orphans: 3;
widows: 3;
}
/* no breaks inside these elements */
blockquote,
ul,
ol {
page-break-inside: avoid;
}
/* page break before main headers
h1,
.h1-like {
page-break-before: always;
}
*/
/* no breaks after these elements */
h1,
.#{$kna-namespace}h1-like,
h2,
.#{$kna-namespace}h2-like,
h3,
.#{$kna-namespace}h3-like,
caption {
page-break-after: avoid;
}
a {
color: #000;
}
/* displaying URLs
a[href]::after {
content: " (" attr(href) ")";
}
*/
a[href^="javascript:"],
a[href^="#"] {
&::after {
content: "";
}
}
}

View file

@ -0,0 +1,284 @@
/* -------------------------- */
/* ==Responsive helpers */
/* -------------------------- */
/* large screens */
/* ------------- */
@media (min-width: $large) {
/* layouts for large screens */
.#{$kna-namespace}large-hidden {
display: none !important;
}
.#{$kna-namespace}large-visible {
display: block !important;
}
.#{$kna-namespace}large-no-float {
float: none;
}
.#{$kna-namespace}large-inbl {
display: inline-block;
float: none;
vertical-align: top;
}
/* widths for large screens */
.#{$kna-namespace}large-w25 {
width: 25% !important;
}
.#{$kna-namespace}large-w33 {
width: 33.333333% !important;
}
.#{$kna-namespace}large-w50 {
width: 50% !important;
}
.#{$kna-namespace}large-w66 {
width: 66.666666% !important;
}
.#{$kna-namespace}large-w75 {
width: 75% !important;
}
.#{$kna-namespace}large-w100,
.#{$kna-namespace}large-wauto {
display: block !important;
float: none !important;
clear: none !important;
width: auto !important;
margin-left: 0 !important;
margin-right: 0 !important;
border: 0;
}
/* margins for large screens */
.#{$kna-namespace}large-man,
.#{$kna-namespace}large-ma0 {
margin: 0 !important;
}
}
/* medium screens */
/* -------------- */
@media (min-width: $medium) and (max-width: ($large - 1)) {
/* layouts for medium screens */
.#{$kna-namespace}medium-hidden {
display: none !important;
}
.#{$kna-namespace}medium-visible {
display: block !important;
}
.#{$kna-namespace}medium-no-float {
float: none;
}
.#{$kna-namespace}medium-inbl {
display: inline-block;
float: none;
vertical-align: top;
}
/* widths for medium screens */
.#{$kna-namespace}medium-w25 {
width: 25% !important;
}
.#{$kna-namespace}medium-w33 {
width: 33.333333% !important;
}
.#{$kna-namespace}medium-w50 {
width: 50% !important;
}
.#{$kna-namespace}medium-w66 {
width: 66.666666% !important;
}
.#{$kna-namespace}medium-w75 {
width: 75% !important;
}
.#{$kna-namespace}medium-w100,
.#{$kna-namespace}medium-wauto {
display: block !important;
float: none !important;
clear: none !important;
width: auto !important;
margin-left: 0 !important;
margin-right: 0 !important;
border: 0;
}
/* margins for medium screens */
.#{$kna-namespace}medium-man,
.#{$kna-namespace}medium-ma0 {
margin: 0 !important;
}
}
/* small screens */
/* ------------- */
@media (min-width: $small) and (max-width: ($medium - 1)) {
/* layouts for small screens */
.#{$kna-namespace}small-hidden {
display: none !important;
}
.#{$kna-namespace}small-visible {
display: block !important;
}
.#{$kna-namespace}small-no-float {
float: none;
}
.#{$kna-namespace}small-inbl {
display: inline-block;
float: none;
vertical-align: top;
}
/* widths for small screens */
.#{$kna-namespace}small-w25 {
width: 25% !important;
}
.#{$kna-namespace}small-w33 {
width: 33.333333% !important;
}
.#{$kna-namespace}small-w50 {
width: 50% !important;
}
.#{$kna-namespace}small-w66 {
width: 66.666666% !important;
}
.#{$kna-namespace}small-w75 {
width: 75% !important;
}
.#{$kna-namespace}small-w100,
.#{$kna-namespace}small-wauto {
display: block !important;
float: none !important;
clear: none !important;
width: auto !important;
margin-left: 0 !important;
margin-right: 0 !important;
border: 0;
}
/* margins for small screens */
.#{$kna-namespace}small-man,
.#{$kna-namespace}small-ma0 {
margin: 0 !important;
}
.#{$kna-namespace}small-pan,
.#{$kna-namespace}small-pa0 {
padding: 0 !important;
}
}
/* tiny screens */
/* ------------ */
@media (max-width: $small - 1) {
/* quick small resolution reset */
.#{$kna-namespace}mod,
.#{$kna-namespace}col,
fieldset {
display: block !important;
float: none !important;
clear: none !important;
width: auto !important;
margin-left: 0 !important;
margin-right: 0 !important;
border: 0;
}
.#{$kna-namespace}flex-container {
flex-direction: column;
}
/* layouts for tiny screens */
.#{$kna-namespace}tiny-hidden {
display: none !important;
}
.#{$kna-namespace}tiny-visible {
display: block !important;
}
.#{$kna-namespace}tiny-no-float {
float: none;
}
.#{$kna-namespace}tiny-inbl {
display: inline-block;
float: none;
vertical-align: top;
}
/* widths for tiny screens */
.#{$kna-namespace}tiny-w25 {
width: 25% !important;
}
.#{$kna-namespace}tiny-w33 {
width: 33.333333% !important;
}
.#{$kna-namespace}tiny-w50 {
width: 50% !important;
}
.#{$kna-namespace}tiny-w66 {
width: 66.666666% !important;
}
.#{$kna-namespace}tiny-w75 {
width: 75% !important;
}
.#{$kna-namespace}tiny-w100,
.#{$kna-namespace}tiny-wauto {
display: block !important;
float: none !important;
clear: none !important;
width: auto !important;
margin-left: 0 !important;
margin-right: 0 !important;
border: 0;
}
/* margins for tiny screens */
.#{$kna-namespace}tiny-man,
.#{$kna-namespace}tiny-ma0 {
margin: 0 !important;
}
.#{$kna-namespace}tiny-pan,
.#{$kna-namespace}tiny-pa0 {
padding: 0 !important;
}
}

120
sass/_library/_styling.scss Normal file
View file

@ -0,0 +1,120 @@
/* ----------------------------- */
/* ==Stylings (minor stylings) */
/* ----------------------------- */
/* styling elements */
code,
kbd,
mark {
border-radius: 2px;
}
kbd {
padding: 0 2px;
border: 1px solid #999;
}
pre {
tab-size: 2;
}
code {
padding: 2px 4px;
background: rgba(0, 0, 0, 0.04);
color: #b11;
}
pre code {
padding: 0;
background: none;
color: inherit;
border-radius: 0;
}
mark {
padding: 2px 4px;
}
sup,
sub {
vertical-align: 0;
}
sup {
bottom: 1ex;
}
sub {
top: 0.5ex;
}
blockquote {
position: relative;
padding-left: 3em;
min-height: 2em;
}
blockquote::before {
content: "\201C";
position: absolute;
left: 0;
top: 0;
font-family: georgia, serif;
font-size: 5em;
height: .4em;
line-height: .9;
color: rgba(0, 0, 0, .3);
}
blockquote > footer {
margin-top: .75em;
font-size: 0.9em;
color: rgba(0, 0, 0, .7);
&::before {
content: "\2014 \0020";
}
}
q {
font-style: normal;
}
q,
.#{$kna-namespace}q {
quotes: "“\00a0" "\00a0”";
&:lang(fr) {
quotes: "«\00a0" "\00a0»";
}
}
hr {
display: block;
clear: both;
height: 1px;
margin: 1em 0 2em;
padding: 0;
border: 0;
color: #ccc;
background-color: #ccc;
}
/* tables */
table,
.#{$kna-namespace}table {
border: 1px solid #ccc;
}
caption {
padding: $small-value;
color: #555;
font-style: italic;
}
td,
th {
padding: 0.3em 0.8em;
border: 1px #aaa dotted;
text-align: left;
}

View file

@ -0,0 +1,359 @@
/* ---------------------------------- */
/* ==Helpers */
/* ---------------------------------- */
/* State Helpers */
/* ------------- */
/* invisible for all */
.is-hidden,
[hidden] {
display: none;
}
/* hidden but not for an assistive technology like a screen reader, Yahoo! method */
.visually-hidden {
position: absolute !important;
border: 0 !important;
height: 1px !important;
width: 1px !important;
padding: 0 !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
}
.is-disabled,
[disabled] {
opacity: 0.5;
pointer-events: none;
cursor: not-allowed;
filter: grayscale(1);
}
ul {
&.is-unstyled,
&.unstyled {
list-style: none;
padding-left: 0;
}
}
/* Width Helpers */
/* ------------- */
/* blocks widths (percentage and pixels) */
.#{$kna-namespace}w10 {
width: 10%;
}
.#{$kna-namespace}w20 {
width: 20%;
}
.#{$kna-namespace}w25 {
width: 25%;
}
.#{$kna-namespace}w30 {
width: 30%;
}
.#{$kna-namespace}w33 {
width: 33.3333%;
}
.#{$kna-namespace}w40 {
width: 40%;
}
.#{$kna-namespace}w50 {
width: 50%;
}
.#{$kna-namespace}w60 {
width: 60%;
}
.#{$kna-namespace}w66 {
width: 66.6666%;
}
.#{$kna-namespace}w70 {
width: 70%;
}
.#{$kna-namespace}w75 {
width: 75%;
}
.#{$kna-namespace}w80 {
width: 80%;
}
.#{$kna-namespace}w90 {
width: 90%;
}
.#{$kna-namespace}w100 {
width: 100%;
}
.#{$kna-namespace}w50p {
width: 50px;
}
.#{$kna-namespace}w100p {
width: 100px;
}
.#{$kna-namespace}w150p {
width: 150px;
}
.#{$kna-namespace}w200p {
width: 200px;
}
.#{$kna-namespace}w300p {
width: 300px;
}
@media (min-width: 401px) {
.#{$kna-namespace}w400p {
width: 400px;
}
.#{$kna-namespace}w500p {
width: 500px;
}
.#{$kna-namespace}w600p {
width: 600px;
}
}
@media (min-width: 701px) {
.#{$kna-namespace}w700p {
width: 700px;
}
.#{$kna-namespace}w800p {
width: 800px;
}
}
@media (min-width: 961px) {
.#{$kna-namespace}w960p {
width: 960px;
}
.#{$kna-namespace}mw960p {
max-width: 960px;
}
.#{$kna-namespace}w1140p {
width: 1140px;
}
.#{$kna-namespace}mw1140p {
max-width: 1140px;
}
}
.#{$kna-namespace}wauto {
width: auto;
}
/* Spacing Helpers */
/* --------------- */
.#{$kna-namespace}man,
.#{$kna-namespace}ma0 {
margin: 0;
}
.#{$kna-namespace}pan,
.#{$kna-namespace}pa0 {
padding: 0;
}
.#{$kna-namespace}mas {
margin: $small-value;
}
.#{$kna-namespace}mam {
margin: $medium-value;
}
.#{$kna-namespace}mal {
margin: $large-value;
}
.#{$kna-namespace}pas {
padding: $small-value;
}
.#{$kna-namespace}pam {
padding: $medium-value;
}
.#{$kna-namespace}pal {
padding: $large-value;
}
.#{$kna-namespace}mtn,
.#{$kna-namespace}mt0 {
margin-top: 0;
}
.#{$kna-namespace}mts {
margin-top: $small-value;
}
.#{$kna-namespace}mtm {
margin-top: $medium-value;
}
.#{$kna-namespace}mtl {
margin-top: $large-value;
}
.#{$kna-namespace}mrn,
.#{$kna-namespace}mr0 {
margin-right: 0;
}
.#{$kna-namespace}mrs {
margin-right: $small-value;
}
.#{$kna-namespace}mrm {
margin-right: $medium-value;
}
.#{$kna-namespace}mrl {
margin-right: $large-value;
}
.#{$kna-namespace}mbn,
.#{$kna-namespace}mb0 {
margin-bottom: 0;
}
.#{$kna-namespace}mbs {
margin-bottom: $small-value;
}
.#{$kna-namespace}mbm {
margin-bottom: $medium-value;
}
.#{$kna-namespace}mbl {
margin-bottom: $large-value;
}
.#{$kna-namespace}mln,
.#{$kna-namespace}ml0 {
margin-left: 0;
}
.#{$kna-namespace}mls {
margin-left: $small-value;
}
.#{$kna-namespace}mlm {
margin-left: $medium-value;
}
.#{$kna-namespace}mll {
margin-left: $large-value;
}
.#{$kna-namespace}mauto {
margin: auto;
}
.#{$kna-namespace}mtauto {
margin-top: auto;
}
.#{$kna-namespace}mrauto {
margin-right: auto;
}
.#{$kna-namespace}mbauto {
margin-bottom: auto;
}
.#{$kna-namespace}mlauto {
margin-left: auto;
}
.#{$kna-namespace}ptn,
.#{$kna-namespace}pt0 {
padding-top: 0;
}
.#{$kna-namespace}pts {
padding-top: $small-value;
}
.#{$kna-namespace}ptm {
padding-top: $medium-value;
}
.#{$kna-namespace}ptl {
padding-top: $large-value;
}
.#{$kna-namespace}prn,
.#{$kna-namespace}pr0 {
padding-right: 0;
}
.#{$kna-namespace}prs {
padding-right: $small-value;
}
.#{$kna-namespace}prm {
padding-right: $medium-value;
}
.#{$kna-namespace}prl {
padding-right: $large-value;
}
.#{$kna-namespace}pbn,
.#{$kna-namespace}pb0 {
padding-bottom: 0;
}
.#{$kna-namespace}pbs {
padding-bottom: $small-value;
}
.#{$kna-namespace}pbm {
padding-bottom: $medium-value;
}
.#{$kna-namespace}pbl {
padding-bottom: $large-value;
}
.#{$kna-namespace}pln,
.#{$kna-namespace}pl0 {
padding-left: 0;
}
.#{$kna-namespace}pls {
padding-left: $small-value;
}
.#{$kna-namespace}plm {
padding-left: $medium-value;
}
.#{$kna-namespace}pll {
padding-left: $large-value;
}

View file

@ -0,0 +1,248 @@
/* ----------------------------- */
/* ==WordPress reset */
/* ----------------------------- */
/*
Author: Geoffrey Crofte, Alsacréations
Contributors: Automattic, Geoffrey Crofte
Description: Reset styles for WordPress usage of KNACSS
*/
// current menu elements
.current_page_item > a {
}
.current-menu-item > a {
}
.current_page_ancestor > a {
}
// blocks of content navigation
.comment-navigation,
.paging-navigation,
.post-navigation {
overflow: hidden;
margin: 0 0 1.5em;
& .nav-previous {
float: left;
width: 50%;
}
& .nav-next {
float: right;
width: 50%;
text-align: right;
}
}
// class in img elements
.alignnone {
margin: .25em 1.5em 1.5em 0;
}
.aligncenter {
clear: both;
display: block;
margin: 1.5em auto;
}
.alignleft {
float: left;
margin: 0 1.5em .25em 0;
}
.alignright {
float: right;
margin: 0 0 .25em 1.5em;
}
.entry-content,
.comment-content {
clear: both;
&::after,
&::before {
content: "";
display: table;
}
}
.widget + .widget {
margin: 1.5em 0 0;
}
// usage example:
.widget select {
max-width: 100%;
}
/* === 5.1 Posts - post_class === */
// featured content
.sticky {
}
// attachment post
.attachment {
}
// format of post
.format- {
&aside {
}
&gallery {
}
&link {
}
&image {
}
&quote {
}
&status {
}
&video {
}
&chat {
}
}
// class for a tag
.tag- {
&name-of-tag {
}
}
// class for category
.category- {
&name-of-category {
}
}
/* === 5.2 Pages - body_class === */
// front page
.home {
// if display posts
&.blog {
}
// if static page
&.page {
}
}
// page displays posts
.blog {
// if is frontpage
&.home {
}
// if static page
&.page {
}
}
// simple page
.page {
}
// page of single post
.single {
}
// page of archives
.archive {
}
// page of search
.search {
// if has results
.search-results {
}
// if has no results
.search-no-results {
}
}
// page 404
.error404 {
}
// user logged in
.logged-in {
}
// text direction if right-to-left
// prefer rtl.css: http://codex.wordpress.org/Right-to-Left_Language_Support
.rtl {
}
/* === 5.3 Posts and Pages - Contents === */
.hentry {
margin: 0 0 1.5em;
}
.page-content,
.entry-content,
.entry-summary {
margin: 1.5em 0 0;
}
.page-links {
clear: both;
margin: 0 0 1.5em;
}
.comment-content a {
word-wrap: break-word;
}
.bypostauthor {
// some make-the-logo-bigger styles
}
img.wp-smiley {
margin-bottom: 0;
margin-top: 0;
padding: 0;
border: none;
}
.wp-caption {
max-width: 100%;
margin-bottom: 1.5em;
}
.wp-caption img {
display: block;
margin: 0 auto;
}
.wp-caption-text {
margin: 1em 0;
text-align: center;
}
.gallery {
margin-bottom: 1.5em;
}
.gallery-item {
display: inline-block;
width: 100%;
text-align: center;
vertical-align: top;
@for $i from 2 through 9 {
.gallery-columns-#{$i} & {
$w: floor(10000 / $i) / 100;
max-width: unquote($w + '%');
}
}
}
.gallery-caption {
display: block;
}