dlegr250_material_design 0.1.14 → 0.1.15

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: 4f773b6b0bb0798742033b676baf7bff1439b053
4
- data.tar.gz: 95b25d6465726b827265bf7ff1a0abbed7ad21f6
3
+ metadata.gz: 2a8455a68924946623d32906aa4f5efa1d6830f4
4
+ data.tar.gz: ca135e35c5161cbbeb1aa7c08c721b6d428a8b58
5
5
  SHA512:
6
- metadata.gz: 29ee0eac5d15647fdaf345e122e2589b95487d02376b206b177bb0ccf3f3c457bcd76015655b8baf1f0ddbe42c3bd185b69ca0b28eadf210e3c1e2ee2b1b6755
7
- data.tar.gz: 80013a6349fe65669cae0704d37b42bd1daecb50e8982eec1b91a64cc29e301d7ff67e7d2a60111a1368ea640fc0a597d200b6d3e759ed4073b85f364531da91
6
+ metadata.gz: 5357eab5feeb4f501e085f2725e52f721917503ceee5cadcdc90ad27dd7a9abfd0c8da0d64e6be4f8b78942f9f533adf9ef51efe170c851b735f0edd6a677549
7
+ data.tar.gz: d5a85fd12ff0ad850fc0fa722c1c9e383a059056a0712a409f9aca07b58c68d3d563da8ecfe3296925af4a156e3b9fabcdc30d1ab8163b1d9d8d2f5043c4d625
@@ -1,3 +1,3 @@
1
1
  module Dlegr250MaterialDesign
2
- VERSION = "0.1.14"
2
+ VERSION = "0.1.15"
3
3
  end
@@ -0,0 +1,82 @@
1
+ //======================================================================
2
+ // EXAMPLE: Input must come before label.
3
+ // <div class="segmented-control-container segmented-control-blue">
4
+ // <div class="segmented-control">
5
+ // <%= radio_button_tag :full_name, "first" %>
6
+ // <%= label_tag :full_name_first, "First" %>
7
+ // </div>
8
+ // </div>
9
+ //======================================================================
10
+
11
+ // Segmented control - base
12
+ //----------------------------------------------------------------------
13
+
14
+ .segmented-control-container {
15
+ // First element
16
+ .segmented-control:first-child {
17
+ margin-left: 0;
18
+
19
+ label {
20
+ @include rounded-left-corners;
21
+ }
22
+ }
23
+
24
+ // Last element
25
+ .segmented-control:last-child {
26
+ label {
27
+ @include rounded-right-corners;
28
+ }
29
+ }
30
+ }
31
+
32
+ // Segment control - individual element
33
+ //----------------------------------------------------------------------
34
+
35
+ .segmented-control {
36
+ display: inline-block;
37
+ float: left;
38
+ height: $button-height;
39
+ margin-left: -1px;
40
+
41
+ // Hide actual radio button
42
+ input {
43
+ display: none;
44
+ }
45
+
46
+ label {
47
+ border: 1px solid color("divider");
48
+ box-sizing: border-box;
49
+ color: color("helper");
50
+ display: inline-block;
51
+ font-weight: normal;
52
+ height: $button-height;
53
+ line-height: $button-height;
54
+ padding: 0 $spacing-normal;
55
+ }
56
+
57
+ // Default colors
58
+ input:checked ~ label {
59
+ background-color: color("primary");
60
+ color: color("white");
61
+ }
62
+ }
63
+
64
+ // Segment control - colored elements
65
+ //----------------------------------------------------------------------
66
+
67
+ @each $color-name, $color in $colors {
68
+ .segmented-control-#{$color-name} {
69
+ // To color borders and text
70
+ // .segmented-control {
71
+ // label {
72
+ // border-color: $color;
73
+ // color: $color;
74
+ // }
75
+ // }
76
+
77
+ input:checked ~ label {
78
+ background-color: $color;
79
+ color: color("white");
80
+ }
81
+ }
82
+ }
@@ -34,6 +34,7 @@
34
34
  @import "components/forms/selects";
35
35
  @import "components/forms/toggles";
36
36
  @import "components/forms/radios";
37
+ @import "components/forms/segmented_controls";
37
38
  @import "components/forms/helper_texts";
38
39
  @import "components/cards";
39
40
  @import "components/dialogs";
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dlegr250_material_design
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel LeGrand
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-19 00:00:00.000000000 Z
11
+ date: 2016-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -106,6 +106,7 @@ files:
106
106
  - vendor/assets/stylesheets/components/forms/helper_texts.scss
107
107
  - vendor/assets/stylesheets/components/forms/labels.scss
108
108
  - vendor/assets/stylesheets/components/forms/radios.scss
109
+ - vendor/assets/stylesheets/components/forms/segmented_controls.scss
109
110
  - vendor/assets/stylesheets/components/forms/selects.scss
110
111
  - vendor/assets/stylesheets/components/forms/text_fields.scss
111
112
  - vendor/assets/stylesheets/components/forms/toggles.scss