/
_partials.scss
executable file
·145 lines (124 loc) · 4.01 KB
/
_partials.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/**
* Generic Rules, Button Rules and Other Useful Partials
* -----------------------------------------------------------------------------
* @category Stylesheet
* @package Scss Helpers
* @author Mark Grealish <mark@bhalash.com>
* @copyright Copyright (c) 2015, Mark Grealish
* @license http://opensource.org/licenses/MIT The MIT License (MIT)
* @version 2.0
* @link https://github.com/bhalash/scss-helpers
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* This file represents bits and pieces of code that I use across the site which
* aren't attached to a given section of the site.
*/
/**
* Self-clearing Floats
* -----------------------------------------------------------------------------
* Bulletproof and Rock-Solid self-clearing float. You can tell it is both
* Bulletproof and Rock-Solid since I capitalized the words. There are very rare
* instances were I might need to use a clearing element (such as splitting
* floating elements vertically).
*/
.clearfix, %clearfix {
overflow: auto;
&:after {
clear: both;
content: '';
display: table;
}
}
/**
* Modal Popover
* -----------------------------------------------------------------------------
* Set the colours yourself. With CSS3's :target pseudoclass, you can style the
* target of a link.
*
* @link http://codepen.io/gschier/pen/HCoqh
* @link http://www.bhalash.com/archives/13544803981
*/
.pop-modal, %pop-modal {
display: none;
@include fixed(0);
&:target {
display: block;
outline: 0;
z-index: 4;
}
}
/**
* Freeze Content
* -----------------------------------------------------------------------------
* Freeze an element to prevent it from scrolling. This is intended to be used
* in conjunction with modal boxes
*/
.freeze, %freeze {
overflow: hidden;
z-index: -1;
@include fixed(0);
}
/**
* Disable Text Selection
* -----------------------------------------------------------------------------
* It was useful for some feature text on a site.
*/
.noselect, %noselect {
cursor: default;
user-select: none;
}
/**
* Assorted Helper Classes
* -----------------------------------------------------------------------------
*/
.cover-picture, %cover-picture {
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
}
/**
* Flexbox and Flexible Size Rules
* -----------------------------------------------------------------------------
*/
.flex-row, %flex-row {
@include flex-parent(row);
}
.flex-parent, %flex-parent {
@include flex-parent(column);
}
.square-flex, %square-flex {
@include square-flex(100% 1);
}
.flex-child, %flex-child {
@include flex-child(1);
}
/**
* Text Element Columns
* -----------------------------------------------------------------------------
*/
.text-two, %text-two {
@include columns(2, 20px);
}
.text-three, %text-three {
@include columns(3, 20px);
}
.text-four, %text-four {
@include columns(4, 20px);
}