Skip to content

Commit 3065ee9

Browse files
committed
Turning breakpoints bit into it's own seperate module
It really should have been it's own seperate module all along
1 parent 9c4300e commit 3065ee9

File tree

4 files changed

+32
-8
lines changed

4 files changed

+32
-8
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
mixin breakpoints
3+
.breakpoints&attributes(attributes)
4+
h2 Breakpoints
5+
.breakpoints__size.-minimum
6+
.breakpoints__size.-small
7+
.breakpoints__size.-medium
8+
.breakpoints__size.-large
9+
.breakpoints__size.-page
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
.breakpoints {
3+
padding: 20px;
4+
border: 2px solid #000;
5+
6+
&__size {
7+
@each $name, $value in $breakpoints {
8+
&.-#{$name} {
9+
&::before {
10+
content: 'BP-#{$name}: ';
11+
}
12+
&::after {
13+
content: '#{$value}';
14+
font-weight: bold;
15+
font-size: 1.2em;
16+
}
17+
}
18+
}
19+
}
20+
}

src/_modules/tests/tests.pug

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11

22
include ../../../unit-tests/height/insideHeight/insideHeight
33

4-
.breakpoints
5-
h2 Breakpoints
6-
.breakpoints__size.-minimum
7-
.breakpoints__size.-small
8-
.breakpoints__size.-medium
9-
.breakpoints__size.-large
10-
.breakpoints__size.-page
11-
124
h2#tests Tests
135

146
-

src/index.pug

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ extends _layouts/base
22

33
block append includes
44
include /_modules/demo/demo
5+
include /_modules/breakpoints/breakpoints
56

67
block content
78
:marked
89
This is a testing/demo site for mq-scss. Full documentation can be found on [GitHub](https://github.com/Dan503/mq-scss) and [npm](https://www.npmjs.com/package/mq-scss).
910

1011
This site is best viewed on desktop. Resizing the browser window will cause different media queries to activate at different screen sizes.
1112

13+
+breakpoints
14+
1215
include /_modules/tests/tests

0 commit comments

Comments
 (0)