Skip to content

Commit

Permalink
Fix lint rule violations
Browse files Browse the repository at this point in the history
  • Loading branch information
atanas-dev committed Oct 28, 2018
1 parent 710f716 commit 95283ca
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 45 deletions.
1 change: 1 addition & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public function register() {

$file = get_theme_file_path( 'dist/mix-manifest.json' );

// @codingStandardsIgnoreLine WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
return file_exists( $file ) ? json_decode( file_get_contents( $file ), true ) : null;
} );
}
Expand Down
12 changes: 6 additions & 6 deletions resources/scss/blocks/core/_file.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
padding: 0.5em 1em;
text-decoration: none;

// Give the file block button some spacing to the left if there's
// another element preceding it.
* + & {
margin-left: 0.75em;
}

&:hover,
&:visited,
&:focus,
Expand All @@ -33,9 +39,3 @@
}
}
}

// Give the file block button some spacing to the left if there's another element
// preceding it.
* + .wp-block-file__button {
margin-left: 0.75em;
}
54 changes: 23 additions & 31 deletions resources/scss/blocks/core/_gallery.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,21 @@
flex-direction: column;
justify-content: center;
position: relative;
// Fallback to 2 columns.
width: calc( 100% / 2 - 16px );

// 1 column.
.columns-1 & {
width: calc( 100% / 1 - 16px );
}

// Image figure.
figure {
margin: 0;
height: 100%;

// IE11 doesn't support flex and can't read this.
@supports( position: sticky ) {
@supports ( position: sticky ) {
display: flex;
align-items: flex-end;
justify-content: flex-start;
Expand All @@ -46,7 +53,7 @@
width: 100%;

// IE11 can't read this.
@supports( position: sticky ) {
@supports ( position: sticky ) {
width: auto;
}
}
Expand All @@ -59,45 +66,30 @@
padding: 40px 10px 5px;
text-align: center;
color: color( white );
background: linear-gradient(
0deg,
rgba( color( black ), 0.7 ) 0,
rgba( color( black ), 0.3 ) 60%,
transparent
);
background: linear-gradient( 0deg, rgba( color( black ), 0.7 ) 0, rgba( color( black ), 0.3 ) 60%, transparent );

img {
display: inline;
}
}
}

// Cropped images.
.is-cropped .blocks-gallery-item {
a,
img {
flex: 1;
width: 100%;

// IE11 doesn't support object-fit.
@supports( position: sticky ) {
flex: 1;
height: 100%;
object-fit: cover;
// Cropped images.
.is-cropped & {
a,
img {
flex: 1;
width: 100%;

// IE11 doesn't support object-fit.
@supports ( position: sticky ) {
flex: 1;
height: 100%;
object-fit: cover;
}
}
}
}

// Fallback to 2 columns.
.blocks-gallery-item {
width: calc( 100% / 2 - 16px );
}

// 1 column.
.columns-1 .blocks-gallery-item {
width: calc( 100% / 1 - 16px );
}

// 3-8 columns on larger screens.
@media ( min-width: break( small ) ) {

Expand Down
2 changes: 0 additions & 2 deletions resources/scss/blocks/core/_image.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,4 @@
max-width: none;
}
}

figcaption {}
}
10 changes: 5 additions & 5 deletions resources/scss/utilities/_alignment.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

// Left alignment.
.alignleft {
@media( min-width: content-width() / 2 ) {
@media ( min-width: content-width() / 2 ) {
float: left;
margin: 0 1.5rem 1.5rem 0;
max-width: 50%;
Expand All @@ -20,7 +20,7 @@

// Right alignment.
.alignright {
@media( min-width: content-width() / 2 ) {
@media ( min-width: content-width() / 2 ) {
float: left;
margin: 0 0 1.5rem 1.5rem;
max-width: 50%;
Expand All @@ -40,16 +40,16 @@
.alignfull,
.alignwide {
margin-left : calc( -100vw / 2 + 100% / 2 );
margin-right : calc( -100vw / 2 + 100% / 2 );
margin-right : calc( -100vw / 2 + 100% / 2 );
width: auto;
max-width: 100vw;
}

@media( min-width: content-width() ) {
@media ( min-width: content-width() ) {

.alignwide {
margin-left : -25%;
margin-right : -25%;
max-width : calc( #{ content-width() } + 50% );
}
}
}
2 changes: 1 addition & 1 deletion resources/scss/utilities/_media.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ img.emoji {
display: inline;
width: 1em;
height: 1em;
margin: 0 .07em;
margin: 0 0.07em;
padding: 0;
vertical-align: -0.1em;
background: none;
Expand Down

0 comments on commit 95283ca

Please sign in to comment.