refonte des breakpoints
This commit is contained in:
parent
c940647d2d
commit
3b87077ae3
10 changed files with 66 additions and 597 deletions
7
sass/_config/_breakpoints.scss
Normal file
7
sass/_config/_breakpoints.scss
Normal file
|
@ -0,0 +1,7 @@
|
|||
// Warning : you should use your own values, regardless of the devices
|
||||
// GOOD : (max-width: $BP) and (min-width: ($BP + 1))
|
||||
$tiny: 544px; // or 'em' if you prefer, of course
|
||||
$small: 768px;
|
||||
$medium: 1024px;
|
||||
$large: 1200px;
|
||||
$extra-large: 1440px;
|
38
sass/_config/_mixins.scss
Normal file
38
sass/_config/_mixins.scss
Normal file
|
@ -0,0 +1,38 @@
|
|||
// Additionnal "utility" breakpoints aliases
|
||||
// ex. @include respond-to("portrait-up") {...}
|
||||
@function breakpoint($bp) {
|
||||
@if $bp == 'mobile' {
|
||||
@return '(max-width: #{$tiny})';
|
||||
}
|
||||
@else if $bp == 'portrait' {
|
||||
@return '(min-width: #{$tiny + 1}) and (max-width: #{$small})';
|
||||
}
|
||||
@else if $bp == 'landscape' {
|
||||
@return '(min-width: #{$small + 1}) and (max-width: #{$medium})';
|
||||
}
|
||||
@else if $bp == 'desktop' {
|
||||
@return '(min-width: #{$medium + 1})';
|
||||
}
|
||||
@else if $bp == 'portrait-down' {
|
||||
@return '(max-width: #{$small})';
|
||||
}
|
||||
@else if $bp == 'portrait-up' {
|
||||
@return '(min-width: #{$tiny + 1})';
|
||||
}
|
||||
@else if $bp == 'landscape-down' {
|
||||
@return '(max-width: #{$medium})';
|
||||
}
|
||||
@else if $bp == 'landscape-up' {
|
||||
@return '(min-width: #{$small + 1})';
|
||||
}
|
||||
@else if $bp == 'retina' {
|
||||
@return '(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx)';
|
||||
}
|
||||
}
|
||||
|
||||
@mixin respond-to($value) {
|
||||
$string: breakpoint($value);
|
||||
@media screen and #{$string} {
|
||||
@content;
|
||||
}
|
||||
}
|
55
sass/_config/_variables.scss
Normal file
55
sass/_config/_variables.scss
Normal file
|
@ -0,0 +1,55 @@
|
|||
// Config file and project variables
|
||||
|
||||
// font sizes
|
||||
$base-font-size : 1.4rem !default; // ex. 1.4rem would be "14px" equivalent
|
||||
$line-height : 1.5 !default; // equiv line-height 1.5
|
||||
$h1-size : 3.2rem !default; // equiv "32px"
|
||||
$h2-size : 2.8rem !default; // equiv "28px"
|
||||
$h3-size : 2.4rem !default; // equiv "24px"
|
||||
$h4-size : 2.0rem !default; // equiv "20px"
|
||||
$h5-size : 1.8rem !default; // equiv "18px"
|
||||
$h6-size : 1.6rem !default; // equiv "16px"
|
||||
|
||||
// font stacks
|
||||
$font-stack-common : sans-serif !default; // common font
|
||||
$font-stack-headings : sans-serif !default; // headings font
|
||||
$font-stack-monospace : consolas, courier, monospace !default; // monospace font
|
||||
|
||||
// font colors
|
||||
$base-color : #000 !default; // text color on body and content
|
||||
$alpha-color : #000 !default; // text color on primary elements
|
||||
$beta-color : #000 !default; // text color on secondary elements
|
||||
$headings-color : #000 !default; // text color on headings
|
||||
$headings-1-color : #000 !default; // text color on headings level 1
|
||||
$headings-2-color : #000 !default; // text color on headings level 2
|
||||
$headings-3-color : #000 !default; // text color on headings level 3
|
||||
$base-color-link : #333 !default; // base links color
|
||||
$base-color-link-hover : #000 !default; // base hovered/focused links color
|
||||
|
||||
// backgrounds
|
||||
$base-background : #fff !default; // body background color
|
||||
$alpha-background : #fff !default; // primary elements background color
|
||||
$beta-background : #fff !default; // secondary elements background color
|
||||
|
||||
// spacings (choose unit you prefer)
|
||||
$tiny-value : .5rem !default; // tiny value for margins / paddings
|
||||
$tiny-plus-value : .7rem !default; // tiny+ value for margins / paddings
|
||||
$small-value : 1rem !default; // small value for margins / paddings
|
||||
$small-plus-value : 1.5rem !default; // small+ value for margins / paddings
|
||||
$medium-value : 2rem !default; // medium value for margins / paddings
|
||||
$medium-plus-value : 3rem !default; // medium+ value for margins / paddings
|
||||
$large-value : 4rem !default; // large value for margins / paddings
|
||||
$large-plus-value : 6rem !default; // large value for margins / paddings
|
||||
$extra-large-value : 8rem !default; // extra large value for margins / paddings
|
||||
$extra-large-plus-value : 12rem !default; // extra large value for margins / paddings
|
||||
$ultra-large-value : 16rem !default; // ultra large value for margins / paddings
|
||||
$ultra-large-plus-value : 20rem !default; // ultra large value for margins / paddings
|
||||
|
||||
// grids variables (choose unit you prefer)
|
||||
$grid-gutter: 2rem !default; // gutter value for grid layouts. Unit can be: %, px, em, rem
|
||||
$grid-number: 4 !default; // number of equal columns
|
||||
$grid-left: 2 !default; // left side of uneven columns
|
||||
$grid-right: 1 !default; // right side of uneven columns
|
||||
|
||||
//kna-namespace (default : null)
|
||||
$kna-namespace: null !default;
|
Loading…
Add table
Add a link
Reference in a new issue