KNACSS/sass/_library/_wordpress.scss

249 lines
3 KiB
SCSS
Raw Normal View History

2015-03-05 15:21:57 +01:00
/* ----------------------------- */
/* ==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 {
2015-07-01 13:47:48 +02:00
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 {
2015-07-01 13:47:48 +02:00
margin: .25em 1.5em 1.5em 0;
}
.aligncenter {
2015-07-01 13:47:48 +02:00
clear: both;
display: block;
margin: 1.5em auto;
}
.alignleft {
2015-07-01 13:47:48 +02:00
float: left;
margin: 0 1.5em .25em 0;
}
.alignright {
2015-07-01 13:47:48 +02:00
float: right;
margin: 0 0 .25em 1.5em;
}
.entry-content,
.comment-content {
2015-07-01 13:47:48 +02:00
clear: both;
&::after,
&::before {
2015-07-01 13:47:48 +02:00
content: "";
display: table;
}
}
.widget + .widget {
2015-07-01 13:47:48 +02:00
margin: 1.5em 0 0;
}
// usage example:
.widget select {
2015-07-01 13:47:48 +02:00
max-width: 100%;
}
/* === 5.1 Posts - post_class === */
// featured content
.sticky {
}
// attachment post
.attachment {
}
// format of post
.format- {
2015-07-01 13:47:48 +02:00
&aside {
}
&gallery {
}
&link {
}
&image {
}
&quote {
}
&status {
}
&video {
}
&chat {
}
}
// class for a tag
.tag- {
2015-07-01 13:47:48 +02:00
&name-of-tag {
}
}
// class for category
.category- {
2015-07-01 13:47:48 +02:00
&name-of-category {
}
}
/* === 5.2 Pages - body_class === */
// front page
.home {
2015-07-01 13:47:48 +02:00
// if display posts
&.blog {
}
2015-07-01 13:47:48 +02:00
// if static page
&.page {
}
}
// page displays posts
.blog {
2015-07-01 13:47:48 +02:00
// if is frontpage
&.home {
}
2015-07-01 13:47:48 +02:00
// if static page
&.page {
}
}
// simple page
.page {
}
// page of single post
.single {
}
// page of archives
.archive {
}
2015-07-01 13:47:48 +02:00
// page of search
.search {
2015-07-01 13:47:48 +02:00
// if has results
.search-results {
}
2015-07-01 13:47:48 +02:00
// 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 {
2015-07-01 13:47:48 +02:00
margin: 0 0 1.5em;
}
.page-content,
.entry-content,
.entry-summary {
2015-07-01 13:47:48 +02:00
margin: 1.5em 0 0;
}
.page-links {
2015-07-01 13:47:48 +02:00
clear: both;
margin: 0 0 1.5em;
}
.comment-content a {
2015-07-01 13:47:48 +02:00
word-wrap: break-word;
}
.bypostauthor {
2015-07-01 13:47:48 +02:00
// some make-the-logo-bigger styles
}
img.wp-smiley {
2015-07-01 13:47:48 +02:00
margin-bottom: 0;
margin-top: 0;
padding: 0;
border: none;
}
.wp-caption {
2015-07-01 13:47:48 +02:00
max-width: 100%;
margin-bottom: 1.5em;
}
.wp-caption img {
2015-07-01 13:47:48 +02:00
display: block;
margin: 0 auto;
}
.wp-caption-text {
2015-07-01 13:47:48 +02:00
margin: 1em 0;
text-align: center;
}
.gallery {
2015-07-01 13:47:48 +02:00
margin-bottom: 1.5em;
}
.gallery-item {
2015-07-01 13:47:48 +02:00
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 + '%');
2015-07-09 14:41:13 +02:00
}
}
}
.gallery-caption {
2015-07-01 13:47:48 +02:00
display: block;
}