Skip to content

Commit

Permalink
Merge pull request #11 from Eoxia/3.2.1
Browse files Browse the repository at this point in the history
3.2.1
  • Loading branch information
eoxia-amandine authored Aug 24, 2021
2 parents 4661f72 + 2dc5e93 commit 80eefde
Show file tree
Hide file tree
Showing 20 changed files with 1,406 additions and 2,270 deletions.
3 changes: 2 additions & 1 deletion css/scss/fontawesome/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Variables
// --------------------------
@use "sass:math";

$fa-font-path: "../webfonts" !default;
$fa-font-size-base: 16px !default;
Expand All @@ -9,7 +10,7 @@ $fa-version: "5.8.2" !default;
$fa-border-color: #eee !default;
$fa-inverse: #fff !default;
$fa-li-width: 2em !default;
$fa-fw-width: (20em / 16);
$fa-fw-width: math.div(20em, 16);

// Convenience function used to set content property
@function fa-content($fa-var) {
Expand Down
67 changes: 66 additions & 1 deletion css/scss/mixins/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "sass:math";

// Rem output with px fallback
@mixin font-size($sizeValue: 1) {
font-size: ($sizeValue * 16) * 1px;
Expand Down Expand Up @@ -42,7 +44,9 @@
}

@function strip-unit($value) {
@return $value / ($value * 0 + 1);
//@return $value / ($value * 0 + 1);
$valueDiv: $value * 0 + 1;
@return math.div( $value, $valueDiv );
}

@mixin fluid-type($min-vw, $max-vw, $min-font-size, $max-font-size) {
Expand All @@ -63,3 +67,64 @@
}
}
}

// Use 1%, or 1mw, or 1....
@mixin site-width-size($unit: null) {
@if ( $unit == null ) {
$unit: 1%;
}
@else {
$unit: 1+#{$unit};
}

padding-left: calc(12 * #{$unit});
padding-right: calc(12 * #{$unit});


@media ( max-width: $media__medium ) {
padding-left: calc(8 * #{$unit});
padding-right: calc(8 * #{$unit});
}
@media ( max-width: $media__small ) {
padding-left: calc(4 * #{$unit});
padding-right: calc(4 * #{$unit});
}
}

@mixin site-width-size-left($unit: null) {
@if ( $unit == null ) {
$unit: 1%;
}
@else {
$unit: 1+#{$unit};
}

padding-left: calc(12 * #{$unit});


@media ( max-width: $media__medium ) {
padding-left: calc(8 * #{$unit});
}
@media ( max-width: $media__small ) {
padding-left: calc(4 * #{$unit});
}
}

@mixin site-width-size-right($unit: null) {
@if ( $unit == null ) {
$unit: 1%;
}
@else {
$unit: 1+#{$unit};
}

padding-right: calc(12 * #{$unit});


@media ( max-width: $media__medium ) {
padding-right: calc(8 * #{$unit});
}
@media ( max-width: $media__small ) {
padding-right: calc(4 * #{$unit});
}
}
14 changes: 2 additions & 12 deletions css/scss/modules/_alignments.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
.site-width {
width: 100%;
padding-left: 12%;
padding-right: 12%;

@media ( max-width: $media__medium ) {
padding-left: 8%;
padding-right: 8%;
}
@media ( max-width: $media__small ) {
padding-left: 4%;
padding-right: 4%;
}
@include site-width-size;
}
/** Garde seulement la marge du site-width global */
#content.site-width .site-width {
Expand Down Expand Up @@ -50,7 +40,7 @@
width : 100vw;
}
.alignfull img {
width: 100vw;
width: 100%;
}
}

Expand Down
1 change: 1 addition & 0 deletions css/scss/site/block/_block.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
@import "gallery";
@import "media-text";
@import "cover";
@import "group";
6 changes: 6 additions & 0 deletions css/scss/site/block/_cover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@
max-width: none;
padding: 0;
}

.wp-block-cover.alignfull {
.wp-block-cover__inner-container {
@include site-width-size;
}
}
6 changes: 5 additions & 1 deletion css/scss/site/block/_gallery.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
ul.wp-block-gallery {
.wp-block-gallery {
margin-left: 0;

.blocks-gallery-grid {
margin-left: 0;
}

.blocks-gallery-item a {
&::before {
@include fa-icon;
Expand Down
15 changes: 15 additions & 0 deletions css/scss/site/block/_group.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.wp-block-group {
&.has-background {
.wp-block-group__inner-container {
padding: 1.2em 2em;
}
}

&.alignfull {
.wp-block-group__inner-container {
@include site-width-size();
}
}
}


24 changes: 18 additions & 6 deletions css/scss/site/block/_media-text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,31 @@
.wp-block-media-text {
&.alignfull {
.wp-block-media-text__media {
overflow: hidden
}
.wp-block-media-text__media img {
width: 100% !important;
overflow: hidden;
img {
width: 100% !important;
}
}

.wp-block-media-text__content {
@include site-width-size-right(vw);
padding-left: 2em;
}

&.has-media-on-the-right {
.wp-block-media-text__content {
@include site-width-size-left(vw);
padding-right: 2em;
}
}
}

.wp-block-media-text__content {
padding: 0 0 0 8%;
padding: 0 0 0 2em;
}
&.has-media-on-the-right {
.wp-block-media-text__content {
padding: 0 8% 0 0 !important;
padding: 0 2em 0 0;
}
}
}
4 changes: 1 addition & 3 deletions css/scss/site/comments/_comments.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
border-bottom: 1px solid rgba(0,0,0,0.1);
}
.comment-reply-link {
@extend .button;
@extend .button.bordered;
@extend .button.bordered.button-primary;
@extend .button, .bordered, .button-primary;
position: absolute;
top: 0;
right: 0;
Expand Down
3 changes: 1 addition & 2 deletions css/scss/site/forms/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
@extend .button;
@extend .button.button-primary;
@extend .button, .button-primary;
}
4 changes: 3 additions & 1 deletion css/scss/site/media/_galleries.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
@use "sass:math";

.gallery {
margin-bottom: 1.5em;
// Loops to enumerate the classes for gallery columns.
@for $i from 2 through 9 {
&.gallery-columns-#{$i} .gallery-item {
width: ( 100% / $i );
width: math.div( 100%, $i );
}
}
}
Expand Down
Loading

0 comments on commit 80eefde

Please sign in to comment.