Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
inc2734 committed Dec 17, 2016
1 parent e2ae698 commit 66940f5
Show file tree
Hide file tree
Showing 25 changed files with 154 additions and 282 deletions.
4 changes: 1 addition & 3 deletions app/setup/post-class.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ public function remove_hentry( $classes ) {
* @return array
*/
public function post_class( $classes ) {
if ( is_singular() ) {
$classes['_c-entry'] = '_c-entry';
}
$classes['_c-entry'] = '_c-entry';
return $classes;
}
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"dependencies": {
"font-awesome": "^4.7.0",
"getbasis": "^4.3.0",
"getbasis-layout": "^6.0.1",
"getbasis-margin-between-children": "^1.0.2"
"getbasis-layout": "^6.0.1"
},
"devDependencies": {
"autoprefixer": "^6.5.3",
Expand Down
1 change: 0 additions & 1 deletion src/stylus/core/mixin/margin-between-children.styl

This file was deleted.

27 changes: 0 additions & 27 deletions src/stylus/core/variable/typography.styl

This file was deleted.

10 changes: 0 additions & 10 deletions src/stylus/foundation/basis/breadcrumbs.styl
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
.{_prefix}c-breadcrumbs {
_font-size-line-height(_base-font-size-px - 2);

&, a {
color: _color-gray;
}

a {
text-decoration: underline;
}

&__item {
&:nth-child(n + 2) {
mimizuku-fa("\f105");
Expand Down
12 changes: 1 addition & 11 deletions src/stylus/foundation/basis/drawer.styl
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,10 @@
z-index: 100000;
}

&__item, &__subitem {
> a {
color: #fff;

+_hover() {
color: #ccc;
}
}
}

&__toggle {
> .fa {
color: #fff;
transition: transform _transition-duration _transition-function-timing;
_transition(transform);
}

&[aria-expanded="true"] {
Expand Down
23 changes: 22 additions & 1 deletion src/stylus/foundation/basis/entries.styl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.{_prefix}c-entries {
_list-unstyled();
_margin-between-children();

&__item {
> a {
Expand All @@ -9,4 +8,26 @@
text-decoration: none;
}
}

.{_prefix}c-entry {
&__header {
_margin-bottom(0);
}

> .{_prefix}c-flex-media {
> .{_prefix}c-flex-media__figure {
background-color: _lighter(_color-gray);

&::before {
content: '';
display: block;
padding-top: 75%;
}

+_media-min(md) {
flex-basis: 25%;
}
}
}
}
}
12 changes: 1 addition & 11 deletions src/stylus/foundation/basis/entry.styl
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
.{_prefix}c-entry {
&__header {
_margin-bottom(1);
}

&__title {
_margin-bottom(.25);
_font-size-line-height(_base-font-size * 2);
font-weight: bold;
}

&__content {
_margin-between-children();
_margin-top(0);
}
}
2 changes: 0 additions & 2 deletions src/stylus/foundation/foundation.styl
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ h1 {
input, textarea, keygen, select, button {
font-size: 100%;
}

@import '../../../node_modules/getbasis-margin-between-children/src/stylus/foundation/foundation';
135 changes: 0 additions & 135 deletions src/stylus/foundation/wordpress.styl

This file was deleted.

24 changes: 24 additions & 0 deletions src/stylus/foundation/wordpress/align.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.alignleft {
_margin-right(1);
float: left;

img&, > img {
margin-top: _between-lines;
}
}

.alignright {
_margin-left(1);
float: right;

img&, > img {
margin-top: _between-lines;
}
}

.aligncenter {
margin-right: auto;
margin-left: auto;
display: block;
clear: both;
}
3 changes: 3 additions & 0 deletions src/stylus/foundation/wordpress/bypostauthor.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.bypostauthor {
tab-size: 8; /* dummy property */
}
35 changes: 35 additions & 0 deletions src/stylus/foundation/wordpress/gallery.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.gallery {
_clearfix();
margin-right: _space(-.5);
margin-bottom: _space(-1);
margin-left: _space(-.5);

&-item {
margin-bottom: _space(1);
float: left;
display: block;
padding-right: _space(.5);
padding-left: _space(.5);

for i in 2..9 {
.gallery-columns-{i} & {
width: percentage(1 / i);

&:nth-child({i}n + 1) {
clear: both;
}
}
}
}

&-caption {
display: block;

.gallery-columns-6 &,
.gallery-columns-7 &,
.gallery-columns-8 &,
.gallery-columns-9 & {
display: none;
}
}
}
27 changes: 27 additions & 0 deletions src/stylus/foundation/wordpress/screen-reader-text.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.screen-reader-text {
clip: rect(1px, 1px, 1px, 1px);
position: absolute !important;
height: 1px;
width: 1px;
overflow: hidden;

&:focus {
background-color: #f1f1f1;
border-radius: 3px;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
clip: auto !important;
color: #21759b;
display: block;
font-size: 14px;
font-size: 0.875rem;
font-weight: bold;
height: auto;
left: 5px;
line-height: normal;
padding: 15px 23px 14px;
text-decoration: none;
top: 5px;
width: auto;
z-index: 100000;
}
}
3 changes: 3 additions & 0 deletions src/stylus/foundation/wordpress/sticky.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.sticky {
tab-size: 8; /* dummy property */
}
9 changes: 9 additions & 0 deletions src/stylus/foundation/wordpress/wp-caption.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.wp-caption {
max-width: 100%;

&-text {
_margin(2px, 0, 0);
color: _color-gray;
_font-size-line-height(_base-font-size-px - 2);
}
}
4 changes: 0 additions & 4 deletions src/stylus/object/project/comment.styl
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
_margin(0, 0, 1);
}

&__content {
_margin-between-children();
}

&__reply {
a {
@extend $_btn;
Expand Down
Loading

0 comments on commit 66940f5

Please sign in to comment.