GIPainter-helpers 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 789a1037f6318a8fc6bcd7d18c870a9de9ec5700
4
- data.tar.gz: f11ab9673426ab195571d7b5ea34f61c377ed4cc
3
+ metadata.gz: 3d5969bef26221af77bea832a502ac8b10619a96
4
+ data.tar.gz: 58c79db16fc6f3f72db6645fb721574353645c09
5
5
  SHA512:
6
- metadata.gz: 99da2b85de281364a860c967d7224017d0864ceb7449cce33cccb2cc26969c277afa9e3ad6293344ded7cf0906fdba36d268778d3d4f48288557dc88349db1fa
7
- data.tar.gz: 6ec63b97a2063530ca88f6604b9d74e9892e5c31a2d0f6bb770c009d1e9a95a23f61850500bf76e7cfce9372637f791de54f3b245a9c1b21d5f642b53afc946c
6
+ metadata.gz: a5b70511db4f4ebc7ab4a315b34c82b6e06750ccfb049c33f6f94c03adc5dac19efeba6df1909fd6caa75390e8327238b0cbf517eda64722d8ffa81f6f486bf8
7
+ data.tar.gz: 9926c4bced08a956641d8f89f112ef251bf6e531b57744a86e6c44ad44dc578b4ff8436883c53d64d16f21a0921e89854ec004d649b9eb1185efadcd8a17987c
data/README.md CHANGED
@@ -1,41 +1,41 @@
1
- # GIPainter::Helpers
2
-
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/GIPainter/helpers`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'GIPainter-helpers'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install GIPainter-helpers
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/aprioul/GIPainter-helpers.
36
-
37
-
38
- ## License
39
-
40
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
-
1
+ # GIPainter::Helpers
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/GIPainter/helpers`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'GIPainter-helpers'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install GIPainter-helpers
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/aprioul/GIPainter-helpers.
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
+
@@ -0,0 +1,102 @@
1
+ @import "compass/css3";
2
+ @import "colors";
3
+
4
+ //-----------------------------------
5
+ // HELPER
6
+ // BORDERS CLASSES GENERATION
7
+ //-----------------------------------
8
+
9
+ ////
10
+ /// @access public
11
+ /// @group Borders
12
+ ////
13
+
14
+ //** Default positions
15
+ /// Generate all border positions
16
+ /// @example css - class="border-(pos*)-(size)-(color)"
17
+ /// .border-3-black {
18
+ /// border: 3px solid #000;
19
+ /// }
20
+ /// // ! Max Border size Value : 5
21
+ /// //* is optionnal
22
+ $border_positionANDcolors: (
23
+ border:"",
24
+ border-top: "top",
25
+ border-right: "right",
26
+ border-bottom: "bottom",
27
+ border-left: "left"
28
+ );
29
+
30
+ /*----------------
31
+ Borders
32
+ ----------------*/
33
+ $max-border-size : 5;
34
+
35
+ @for $i from 1 through $max-border-size{
36
+ @each $nameC, $valueC in $merge_colors {
37
+ @each $name, $value in $border_positionANDcolors {
38
+ .#{"" + $name}-#{"" + $i}-#{"" + $nameC} {
39
+ #{$name}: $i + px solid #{"" + $valueC};
40
+ }
41
+ }
42
+ }
43
+ }
44
+ .border-none{
45
+ border: none;
46
+ }
47
+
48
+
49
+ /// Generate all border radius
50
+ /// @example css - class="border-(pos*)-radius-(size)"
51
+ /// .border-top-left-radius-3 {
52
+ /// border-top-left-radius: 3px;
53
+ /// -webkit-border-top-left-radius: 3px;
54
+ /// -moz-border-radius-topleft: 3px;
55
+ /// }
56
+ /// // ! Max Radius Value : 5
57
+ /// //* is optionnal
58
+
59
+ $border_radius: (
60
+ border:"",
61
+ border-top-left: "topleft",
62
+ border-top-right: "topright",
63
+ border-bottom-left: "bottomleft",
64
+ border-bottom-right: "bottomright"
65
+ );
66
+
67
+ /*----------------
68
+ Borders Radius
69
+ ----------------*/
70
+ $max-border-radius : 5;
71
+
72
+ //@for $i from 1 through $max-border-radius{
73
+ // @each $name, $value in $border_radius {
74
+ // .#{"" + $name}-radius-#{"" + $i} {
75
+ // #{"" + $name}-radius: $i + px;
76
+ // -webkit-#{"" + $name}-radius: $i + px;
77
+ // @if $value != ""{
78
+ // -moz-border-radius-#{"" + $value}: $i + px;
79
+ // }
80
+ // @else{
81
+ // -moz-border-radius: $i + px;
82
+ // }
83
+ // }
84
+ // }
85
+ //}
86
+
87
+ $css3_radius: (
88
+ border-radius:"",
89
+ border-radius-top-left: "top-left",
90
+ border-radius-top-right: "top-right",
91
+ border-radius-bottom-left: "bottom-left",
92
+ border-radius-bottom-right: "bottom-right"
93
+ );
94
+
95
+
96
+ @for $i from 1 through $max-border-radius{
97
+ @each $name, $value in $css3_radius {
98
+ .#{"" + $name}-#{"" + $i} {
99
+ @include border-top-left-radius($max-border-radius + px);
100
+ }
101
+ }
102
+ }
@@ -0,0 +1,90 @@
1
+ //-----------------------------------
2
+ // HELPER
3
+ // COLORS CLASSES GENERATION
4
+ //-----------------------------------
5
+
6
+ ////
7
+ /// @access public
8
+ /// @group Colors
9
+ /// @type Map
10
+ ////
11
+
12
+ //** Default Colors
13
+ /// @ignore Message
14
+ /// @prop {Color} white [$white]
15
+ /// @prop {Color} black [$black]
16
+ /// @prop {Color} gray-darker [$gray-darker]
17
+ /// @prop {Color} gray-dark [$gray-dark]
18
+ /// @prop {Color} gray [$gray]
19
+ /// @prop {Color} gray-light [$gray-light]
20
+ /// @prop {Color} gray-lighter [$gray-lighter]
21
+
22
+ $default_colors: (
23
+ white: $white,
24
+ black: $black,
25
+ gray-darker: $gray-darker,
26
+ gray-dark: $gray-dark,
27
+ gray: $gray,
28
+ gray-light: $gray-light,
29
+ gray-lighter: $gray-lighter
30
+ );
31
+
32
+ //** Brand Colors
33
+
34
+ /// @prop {Color} brand-primary [$brand-primary]
35
+ /// @prop {Color} brand-secondary [$brand-secondary]
36
+ /// @prop {Color} brand-success [$brand-success]
37
+ /// @prop {Color} brand-warning [$brand-warning]
38
+ /// @prop {Color} brand-danger [$brand-danger]
39
+
40
+ $brand_colors: (
41
+ brand-primary: $brand-primary,
42
+ brand-secondary: $brand-secondary,
43
+ brand-success: $brand-success,
44
+ brand-info: $brand-info,
45
+ brand-warning: $brand-warning,
46
+ brand-danger: $brand-danger,
47
+ );
48
+
49
+ //** Classes generation
50
+ $merge_colors: map-merge($default_colors, $brand_colors);
51
+
52
+ /*----------------
53
+ Colors
54
+ ----------------*/
55
+
56
+ @each $name, $value in $merge_colors {
57
+ .#{"" + $name} {
58
+ color: $value;
59
+ }
60
+ }
61
+
62
+ // Contextual colors
63
+ .text-muted {
64
+ color: $gray;
65
+ }
66
+ //.text-primary {
67
+ // @include text-emphasis-variant($brand-primary);
68
+ //}
69
+ //.text-success {
70
+ // @include text-emphasis-variant($brand-success);
71
+ //}
72
+ //.text-info {
73
+ // @include text-emphasis-variant($brand-info);
74
+ //}
75
+ //.text-warning {
76
+ // @include text-emphasis-variant($brand-warning);
77
+ //}
78
+ //.text-error {
79
+ // @include text-emphasis-variant($brand-error);
80
+ //}
81
+
82
+ /*----------------
83
+ Backgrounds
84
+ ----------------*/
85
+
86
+ @each $name, $value in $merge_colors {
87
+ .bg-#{"" + $name} {
88
+ background-color: $value;
89
+ }
90
+ }
@@ -0,0 +1,63 @@
1
+ //-----------------------------------
2
+ // HELPER
3
+ // MARGINS CLASSES GENERATION
4
+ //-----------------------------------
5
+
6
+ ////
7
+ /// @access public
8
+ /// @group Margin/Padding
9
+ /// @type Margin
10
+ ////
11
+
12
+ /// Max margin value in margin map
13
+ /// @example class="mg(Pos)-(value)"
14
+ $max-margin : 20;
15
+
16
+
17
+ /*----------------
18
+ Margins
19
+ ----------------*/
20
+ $grid-mg: mg !default;
21
+
22
+ @for $i from 0 through $max-margin{
23
+ .#{$grid-mg}-#{$i} {
24
+ margin: $i + px;
25
+ }
26
+ }
27
+
28
+ // Margin top
29
+ $grid-mgt: mgt !default;
30
+
31
+ @for $i from 0 through $max-margin{
32
+ .#{$grid-mgt}-#{$i} {
33
+ margin-top: $i + px;
34
+ }
35
+ }
36
+
37
+ // Margin right
38
+ $grid-mgr: mgr !default;
39
+
40
+ @for $i from 0 through $max-margin{
41
+ .#{$grid-mgr}-#{$i} {
42
+ margin-right: $i + px;
43
+ }
44
+ }
45
+
46
+ // Margin bottom
47
+ $grid-mgb: mgb !default;
48
+
49
+ @for $i from 0 through $max-margin{
50
+ .#{$grid-mgb}-#{$i} {
51
+ margin-bottom: $i + px;
52
+ }
53
+ }
54
+
55
+
56
+ // Margin left
57
+ $grid-mgl: mgl !default;
58
+
59
+ @for $i from 0 through $max-margin{
60
+ .#{$grid-mgl}-#{$i} {
61
+ margin-left: $i + px;
62
+ }
63
+ }
@@ -0,0 +1,65 @@
1
+ //-----------------------------------
2
+ // HELPER
3
+ // PADDINGS CLASSES GENERATION
4
+ //-----------------------------------
5
+
6
+ ////
7
+ /// @access public
8
+ /// @group Margin/Padding
9
+ /// @type Paddings
10
+ ////
11
+
12
+ /// Max padding value in padding map
13
+ /// @example class="pd(Pos)-(value)"
14
+ $max-padding : 20;
15
+
16
+ /*----------------
17
+ Paddings
18
+ ----------------*/
19
+ $grid-pd: pd !default;
20
+
21
+ @for $i from 0 through $max-padding{
22
+ .#{$grid-pd}-#{$i} {
23
+ padding: $i + px;
24
+ }
25
+ }
26
+
27
+ // Padding top
28
+
29
+ $grid-pdt: pdt !default;
30
+
31
+ @for $i from 0 through $max-padding{
32
+ .#{$grid-pdt}-#{$i} {
33
+ padding-top: $i + px;}
34
+
35
+ }
36
+
37
+
38
+ // Padding right
39
+ $grid-pdr: pdr !default;
40
+
41
+ @for $i from 0 through $max-padding{
42
+ .#{$grid-pdr}-#{$i} {
43
+ padding-right: $i + px;
44
+ }
45
+ }
46
+
47
+
48
+ // Padding bottom
49
+ $grid-pdb: pdb !default;
50
+
51
+ @for $i from 0 through $max-padding{
52
+ .#{$grid-pdb}-#{$i} {
53
+ padding-bottom: $i + px;
54
+ }
55
+ }
56
+
57
+
58
+ // Padding left
59
+ $grid-pdl: pdl !default;
60
+
61
+ @for $i from 0 through $max-padding{
62
+ .#{$grid-pdl}-#{$i} {
63
+ padding-left: $i + px;
64
+ }
65
+ }
@@ -0,0 +1,103 @@
1
+ //-----------------------------------
2
+ // HELPER
3
+ // POSITIONING CLASSES GENERATION
4
+ //-----------------------------------
5
+
6
+ ////
7
+ /// @access public
8
+ /// @group Positioning
9
+ /// @type Positioning
10
+ ////
11
+
12
+ /// Default padding in Wrappers
13
+ /// @example class="wrapper"
14
+ $wrapper: 10;
15
+
16
+ /// Left Position
17
+ /// @example class="pull-left"
18
+ .pull-left{
19
+ float:left !important;
20
+ }
21
+
22
+ /// Right Position
23
+ /// @example class="pull-right"
24
+ .pull-right{
25
+ float:right !important;
26
+ }
27
+
28
+ /// Show Element
29
+ .show {
30
+ display: block !important;
31
+ }
32
+
33
+ /// Hide Element
34
+ .invisible {
35
+ visibility: hidden;
36
+ }
37
+
38
+ /// Hide from screenreaders and browsers
39
+ .hidden {
40
+ display: none !important;
41
+ }
42
+
43
+ /// Absolute
44
+ .absolute{
45
+ position:absolute;
46
+ }
47
+
48
+ /// Relative
49
+ .relative{
50
+ position:relative;
51
+ }
52
+
53
+ /// Center Block
54
+ .centerer {
55
+ @include centerer();
56
+ }
57
+
58
+ /// Vertical Align
59
+ .vertical-align-inline{
60
+ @include vertical-align-inline;
61
+ }
62
+
63
+ // Z-index master list
64
+ //
65
+ // Warning: Avoid customizing these values. They're used for a bird's eye view
66
+ // of components dependent on the z-axis and are designed to all work together.
67
+
68
+ $zindex-dropdown-backdrop: 990 !default;
69
+ $zindex-navbar: 1000 !default;
70
+ $zindex-dropdown: 1000 !default;
71
+ $zindex-fixed: 1030 !default;
72
+ $zindex-sticky: 1030 !default;
73
+ $zindex-modal-backdrop: 1040 !default;
74
+ $zindex-modal: 1050 !default;
75
+ $zindex-popover: 1060 !default;
76
+ $zindex-tooltip: 1070 !default;
77
+
78
+ /// Fixed Top
79
+ .fixed-top {
80
+ position: fixed;
81
+ top: 0;
82
+ right: 0;
83
+ left: 0;
84
+ z-index: $zindex-fixed;
85
+ }
86
+
87
+ /// Fixed Bottom
88
+ .fixed-bottom {
89
+ position: fixed;
90
+ right: 0;
91
+ bottom: 0;
92
+ left: 0;
93
+ z-index: $zindex-fixed;
94
+ }
95
+
96
+ /// Sticky Top
97
+ .sticky-top {
98
+ position: sticky;
99
+ top: 0;
100
+ z-index: $zindex-sticky;
101
+ }
102
+
103
+
@@ -0,0 +1,164 @@
1
+ //-----------------------------------
2
+ // HELPER
3
+ // PADDINGS & MARGINS CLASSES GENERATION
4
+ //-----------------------------------
5
+
6
+ /* Margin and Padding From Bootstrap 4*/
7
+
8
+ // Grid breakpoints
9
+ //
10
+ // Define the minimum dimensions at which your layout will change,
11
+ // adapting to different screen sizes, for use in media queries.
12
+ $grid-breakpoints: (
13
+ xs: 0,
14
+ sm: 576px,
15
+ md: 768px,
16
+ lg: 992px,
17
+ xl: 1200px
18
+ ) !default;
19
+
20
+ // Minimum breakpoint width. Null for the smallest (first) breakpoint.
21
+ //
22
+ // >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px))
23
+ // 576px
24
+ @function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
25
+ $min: map-get($breakpoints, $name);
26
+ @return if($min != 0, $min, null);
27
+ }
28
+
29
+ // Maximum breakpoint width. Null for the largest (last) breakpoint.
30
+ // The maximum value is calculated as the minimum of the next one less 0.1.
31
+ //
32
+ // >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px))
33
+ // 767px
34
+ @function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
35
+ $next: breakpoint-next($name, $breakpoints);
36
+ @return if($next, breakpoint-min($next, $breakpoints) - 1px, null);
37
+ }
38
+
39
+ // Returns a blank string if smallest breakpoint, otherwise returns the name with a dash infront.
40
+ // Useful for making responsive utilities.
41
+ //
42
+ // >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px))
43
+ // "" (Returns a blank string)
44
+ // >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px))
45
+ // "-sm"
46
+ @function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {
47
+ @return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}");
48
+ }
49
+
50
+ // Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
51
+ // Makes the @content apply to the given breakpoint and wider.
52
+ @mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {
53
+ $min: breakpoint-min($name, $breakpoints);
54
+ @if $min {
55
+ @media (min-width: $min) {
56
+ @content;
57
+ }
58
+ } @else {
59
+ @content;
60
+ }
61
+ }
62
+
63
+ // Spacing
64
+ //
65
+ // Control the default styling of most Bootstrap elements by modifying these
66
+ // variables. Mostly focused on spacing.
67
+ // You can add more entries to the $spacers map, should you need more variation.
68
+
69
+ $spacer: 1rem !default;
70
+ $spacer-x: $spacer !default;
71
+ $spacer-y: $spacer !default;
72
+ $spacers: (
73
+ 0: (
74
+ x: 0,
75
+ y: 0
76
+ ),
77
+ 1: (
78
+ x: ($spacer-x * .25),
79
+ y: ($spacer-y * .25)
80
+ ),
81
+ 2: (
82
+ x: ($spacer-x * .5),
83
+ y: ($spacer-y * .5)
84
+ ),
85
+ 3: (
86
+ x: $spacer-x,
87
+ y: $spacer-y
88
+ ),
89
+ 4: (
90
+ x: ($spacer-x * 1.5),
91
+ y: ($spacer-y * 1.5)
92
+ ),
93
+ 5: (
94
+ x: ($spacer-x * 3),
95
+ y: ($spacer-y * 3)
96
+ )
97
+ ) !default;
98
+
99
+ ////
100
+ /// @access public
101
+ /// @group Margin/Padding
102
+ /// @type Margin & Paddings
103
+ ////
104
+
105
+ /// Margins & Paddings wicth all breakpoints, from xs to xl and X-Y positions.
106
+ ///
107
+ /// ! Max Padding/Margin Values : 5
108
+ /// @example css - class="mg/pd(Pos)-(value)"
109
+ /// .mgt-2 {
110
+ /// margin-top: 2px;
111
+ /// }
112
+ /// @example css - class="mg(Pos-X/Y)-(breakpoint)-(value)"
113
+ /// .mgy-sm-4 {
114
+ /// @media (min-width: 576px) {
115
+ /// margin-top: 4px;
116
+ /// margin-bottom: 4px;
117
+ /// }
118
+ /// }
119
+
120
+ $GI_spacing : mg/pd(Pos)-(value);
121
+
122
+ @each $breakpoint in map-keys($grid-breakpoints) {
123
+ @include media-breakpoint-up($breakpoint) {
124
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
125
+
126
+ @each $prop, $abbrev in (margin: mg, padding: pd) {
127
+ @each $size, $lengths in $spacers {
128
+ $length-x: map-get($lengths, x);
129
+ $length-y: map-get($lengths, y);
130
+
131
+ .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length-y $length-x !important; }
132
+ .#{$abbrev}t#{$infix}-#{$size} { #{$prop}-top: $length-y !important; }
133
+ .#{$abbrev}r#{$infix}-#{$size} { #{$prop}-right: $length-x !important; }
134
+ .#{$abbrev}b#{$infix}-#{$size} { #{$prop}-bottom: $length-y !important; }
135
+ .#{$abbrev}l#{$infix}-#{$size} { #{$prop}-left: $length-x !important; }
136
+ .#{$abbrev}x#{$infix}-#{$size} {
137
+ #{$prop}-right: $length-x !important;
138
+ #{$prop}-left: $length-x !important;
139
+ }
140
+ .#{$abbrev}y#{$infix}-#{$size} {
141
+ #{$prop}-top: $length-y !important;
142
+ #{$prop}-bottom: $length-y !important;
143
+ }
144
+ }
145
+ }
146
+
147
+ // Some special margin utils
148
+ .m#{$infix}-auto { margin: auto !important; }
149
+ .mt#{$infix}-auto { margin-top: auto !important; }
150
+ .mr#{$infix}-auto { margin-right: auto !important; }
151
+ .mb#{$infix}-auto { margin-bottom: auto !important; }
152
+ .ml#{$infix}-auto { margin-left: auto !important; }
153
+ .mx#{$infix}-auto {
154
+ margin-right: auto !important;
155
+ margin-left: auto !important;
156
+ }
157
+ .my#{$infix}-auto {
158
+ margin-top: auto !important;
159
+ margin-bottom: auto !important;
160
+ }
161
+ }
162
+ }
163
+
164
+
@@ -0,0 +1,180 @@
1
+ //-----------------------------------
2
+ // HELPER
3
+ // TYPOGRAPHY CLASSES GENERATION
4
+ //-----------------------------------
5
+
6
+ ////
7
+ /// @access public
8
+ /// @group Typography
9
+ /// @type typography
10
+ ////
11
+
12
+ //** Default Typography
13
+
14
+ /// @prop {typography} font-family-sans-serif [$font-family-sans-serif]
15
+ /// @prop {typography} font-family-serif [$font-family-serif]
16
+ /// @prop {typography} gray-font-family-monospace [$font-family-monospace]
17
+ /// @prop {typography} gray-font-family-base [$font-family-base]
18
+
19
+ $default_typo: (
20
+ font-family-sans-serif: $font-family-sans-serif,
21
+ font-family-serif: $font-family-serif,
22
+ font-family-monospace: $font-family-monospace,
23
+ font-family-base: $font-family-base
24
+ );
25
+
26
+ /*----------------
27
+ Fonts Family
28
+ ----------------*/
29
+
30
+ @each $name, $value in $default_typo {
31
+ .#{"" + $name} {
32
+ font-family: $value;
33
+ }
34
+ }
35
+
36
+ //** Default Typography size
37
+
38
+ /// @prop {typography} font-size-base [$font-size-base]
39
+ /// @prop {typography} font-size-large [$font-size-large]
40
+ /// @prop {typography} font-size-small [$font-size-small]
41
+
42
+ $default_typo_size: (
43
+ font-size-base: $font-size-base,
44
+ font-size-large: $font-size-large,
45
+ font-size-small: $font-size-small
46
+ );
47
+
48
+ /*----------------
49
+ Fonts sizes
50
+ ----------------*/
51
+
52
+ @each $name, $value in $default_typo_size {
53
+ .#{"" + $name} {
54
+ font-size: $value;
55
+ }
56
+ }
57
+
58
+ .small {
59
+ font-size: floor((100% * $font-size-small / $font-size-base));
60
+ }
61
+
62
+ /*----------------
63
+ Lead-Sizes
64
+ ----------------*/
65
+
66
+ .lead {
67
+ margin-bottom: $line-height-computed;
68
+ @include font-size( floor(($font-size-base * 1.15)));
69
+ font-weight: 300;
70
+ line-height: 1.4;
71
+
72
+ @media (min-width: $screen-sm) {
73
+ @include font-size($font-size-base * 1.5);
74
+ }
75
+ }
76
+
77
+ $max-lead : 28;
78
+
79
+ @for $i from 10 through $max-lead{
80
+
81
+ .lead-#{"" + $i}{
82
+ font-size: $i + px;
83
+ line-height: $i;
84
+ }
85
+ }
86
+
87
+ /*----------------
88
+ Fonts Weight & Styles
89
+ ----------------*/
90
+
91
+ $style: normal, bold, bolder;
92
+ @each $i in $style {
93
+ .#{$i}{
94
+ font-weight: #{$i};
95
+ }
96
+ }
97
+
98
+ //Emphasis
99
+ .italic{
100
+ font-style: italic;
101
+ }
102
+
103
+ //Strong
104
+ .strong{
105
+ font-family: inherit;
106
+ font-weight: bold;
107
+ }
108
+
109
+ /*----------------
110
+ Text Align
111
+ ----------------*/
112
+
113
+ $style: left, center, right, justify;
114
+ @each $i in $style {
115
+ .#{$i}{
116
+ text-align: #{$i};
117
+ }
118
+ }
119
+
120
+ .text-nowrap{
121
+ white-space: nowrap;
122
+ }
123
+
124
+ .truncate {
125
+ @include truncate;
126
+ }
127
+
128
+ /*----------------
129
+ Text Transform
130
+ ----------------*/
131
+
132
+ $style: lowercase, capitalize, uppercase;
133
+ @each $i in $style {
134
+ .#{$i}{
135
+ text-transform: #{$i};
136
+ }
137
+ }
138
+
139
+ /*----------------
140
+ Text Decoration
141
+ ----------------*/
142
+
143
+ $style: underline, none;
144
+ @each $i in $style {
145
+ .decoration-#{$i}{
146
+ text-decoration: #{$i};
147
+ }
148
+ }
149
+
150
+
151
+
152
+ .mark {
153
+ background-color: $brand-warning;
154
+ padding: .2em;
155
+ }
156
+
157
+ //Horizontal Rule
158
+ .separator{
159
+ clear: both;
160
+ margin: 0;
161
+ border: 0;
162
+ height: 2px;
163
+ background: $gray;
164
+ }
165
+
166
+ // Abbreviations and acronyms
167
+ .initialism {
168
+ font-size: 90%;
169
+ text-transform: uppercase;
170
+ }
171
+
172
+ //Deleted
173
+ .delete{
174
+ text-decoration: line-through;
175
+ }
176
+
177
+ //Underline
178
+ .underline{
179
+ text-decoration: underline;
180
+ }
@@ -9,4 +9,5 @@
9
9
 
10
10
  // GIPainter Variables and Mixins
11
11
  // -----------------------------------------------------------------------------
12
+ @import "GIPainter-base";
12
13
  @import "Base/**/*";
@@ -1,3 +1,3 @@
1
- module GIPainter_helpers
2
- VERSION = '0.1.4'
3
- end
1
+ module GIPainter_helpers
2
+ VERSION = '0.2.0'
3
+ end
@@ -1,51 +1,51 @@
1
- require 'rubygems'
2
- require 'bundler/setup'
3
- require "GIPainter-helpers/version"
4
-
5
- module GIPainter_helpers
6
- class << self
7
- def load!
8
- register_compass_extension if compass?
9
- configure_sass
10
- end
11
-
12
- # Paths
13
- def gem_path
14
- @gem_path ||= File.expand_path '..', File.dirname(__FILE__)
15
- end
16
-
17
- def stylesheets_path
18
- File.join assets_path, 'stylesheets'
19
- end
20
-
21
- def assets_path
22
- @assets_path ||= File.join gem_path, 'assets'
23
- end
24
-
25
- def compass?
26
- defined?(::Compass::Frameworks)
27
- end
28
-
29
- private
30
-
31
- def configure_sass
32
- require 'sass'
33
-
34
- ::Sass.load_paths << stylesheets_path
35
-
36
- ::Sass::Script::Number.precision = [8, ::Sass::Script::Number.precision].max
37
- end
38
-
39
- def register_compass_extension
40
- ::Compass::Frameworks.register(
41
- 'GIPainter-helpers',
42
- :version => GIPainter_helpers::VERSION,
43
- :path => gem_path,
44
- :stylesheets_directory => stylesheets_path,
45
- :templates_directory => File.join(gem_path, 'templates')
46
- )
47
- end
48
- end
49
- end
50
-
51
- GIPainter_helpers.load!
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+ require "GIPainter-helpers/version"
4
+
5
+ module GIPainter_helpers
6
+ class << self
7
+ def load!
8
+ register_compass_extension if compass?
9
+ configure_sass
10
+ end
11
+
12
+ # Paths
13
+ def gem_path
14
+ @gem_path ||= File.expand_path '..', File.dirname(__FILE__)
15
+ end
16
+
17
+ def stylesheets_path
18
+ File.join assets_path, 'stylesheets'
19
+ end
20
+
21
+ def assets_path
22
+ @assets_path ||= File.join gem_path, 'assets'
23
+ end
24
+
25
+ def compass?
26
+ defined?(::Compass::Frameworks)
27
+ end
28
+
29
+ private
30
+
31
+ def configure_sass
32
+ require 'sass'
33
+
34
+ ::Sass.load_paths << stylesheets_path
35
+
36
+ ::Sass::Script::Number.precision = [8, ::Sass::Script::Number.precision].max
37
+ end
38
+
39
+ def register_compass_extension
40
+ ::Compass::Frameworks.register(
41
+ 'GIPainter-helpers',
42
+ :version => GIPainter_helpers::VERSION,
43
+ :path => gem_path,
44
+ :stylesheets_directory => stylesheets_path,
45
+ :templates_directory => File.join(gem_path, 'templates')
46
+ )
47
+ end
48
+ end
49
+ end
50
+
51
+ GIPainter_helpers.load!
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: GIPainter-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genious Interactive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-15 00:00:00.000000000 Z
11
+ date: 2017-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: GIPainter-base
@@ -144,7 +144,14 @@ extensions: []
144
144
  extra_rdoc_files: []
145
145
  files:
146
146
  - README.md
147
+ - assets/stylesheets/Base/_borders.scss
148
+ - assets/stylesheets/Base/_colors.scss
147
149
  - assets/stylesheets/Base/_core.scss
150
+ - assets/stylesheets/Base/_margins.scss
151
+ - assets/stylesheets/Base/_paddings.scss
152
+ - assets/stylesheets/Base/_positioning.scss
153
+ - assets/stylesheets/Base/_spacing.scss
154
+ - assets/stylesheets/Base/_typo.scss
148
155
  - assets/stylesheets/_GIPainter-helpers.scss
149
156
  - lib/GIPainter-helpers.rb
150
157
  - lib/GIPainter-helpers/version.rb
@@ -170,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
177
  version: '0'
171
178
  requirements: []
172
179
  rubyforge_project:
173
- rubygems_version: 2.6.10
180
+ rubygems_version: 2.5.2
174
181
  signing_key:
175
182
  specification_version: 4
176
183
  summary: A compass extension | helpers