Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
6ef96122
Commit
6ef96122
authored
Oct 20, 2014
by
Aron Carroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass the grid gutter into the grid mixins
parent
8d5d474e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
grid.scss
h/static/styles/grid.scss
+4
-4
grid.scss
h/static/styles/mixins/grid.scss
+5
-6
No files found.
h/static/styles/grid.scss
View file @
6ef96122
...
...
@@ -20,10 +20,10 @@
// four columns on desktop sized viewports.
//
// <div class="grid">
// <div class="column-tablet-
one-half column-desktop-one-quarter
"></div>
// <div class="column-tablet-
one-half column-desktop-one-quarter
"></div>
// <div class="column-tablet-
one-half column-desktop-one-quarter
"></div>
// <div class="column-tablet-
one-half column-desktop-one-quarter
"></div>
// <div class="column-tablet-
1-2 column-desktop-1-4
"></div>
// <div class="column-tablet-
1-2 column-desktop-1-4
"></div>
// <div class="column-tablet-
1-2 column-desktop-1-4
"></div>
// <div class="column-tablet-
1-2 column-desktop-1-4
"></div>
// </div>
.grid
{
@include
grid-row
;
...
...
h/static/styles/mixins/grid.scss
View file @
6ef96122
...
...
@@ -5,14 +5,13 @@
// The implementation is largely based on the grid system created by
// Harry Roberts <http://csswizardry.com/csswizardry-grids/> and the Yahoo
// Pure system <http://git.io/ogODXA>
$grid-gutter
:
20px
!
default
;
// Sets up styles for the grid wrapper.
@mixin
grid-row
{
@mixin
grid-row
(
$gutter
:
0
)
{
margin
:
0
;
padding
:
0
;
// Remove the margin from the first column.
margin-left
:
-
$g
rid-g
utter
;
margin-left
:
-
$gutter
;
// Removes whitespace on browsers that do not support flexbox.
letter-spacing
:
-0
.31em
;
// Remove optimizeLegibility if applied.
...
...
@@ -33,12 +32,12 @@ $grid-gutter: 20px !default;
// Example
//
// .my-awkward-item {
// @include grid-column { width: 43%; }
// @include grid-column
($default-gutter)
{ width: 43%; }
// }
@mixin
grid-column
{
@mixin
grid-column
(
$gutter
:
0
)
{
display
:
inline-block
;
vertical-align
:
top
;
padding-left
:
$g
rid-g
utter
;
padding-left
:
$gutter
;
vertical-align
:
top
;
width
:
100%
;
box-sizing
:
border-box
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment