livingstyleguide 2.0.0.pre.1 → 2.0.0.pre.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/livingstyleguide/templates/layout.html.erb +1 -1
- data/lib/livingstyleguide/templates/scripts/copy_colors.js.erb +1 -1
- data/lib/livingstyleguide/templates/search-box.html.erb +1 -1
- data/lib/livingstyleguide/version.rb +1 -1
- data/stylesheets/livingstyleguide/_code.scss +3 -3
- data/stylesheets/livingstyleguide/_color-swatches.scss +2 -2
- data/stylesheets/livingstyleguide/_content.scss +2 -2
- data/stylesheets/livingstyleguide/_functions.scss +23 -0
- data/stylesheets/livingstyleguide/_variables.scss +3 -11
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 449f49344b6ba3da4f7f40904374e6e1475c1ab8
|
4
|
+
data.tar.gz: 2fe7b4c46f9051d9843bc6a9c50736739cf0ac57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14246bdf8204e3cb21e7fce5365812db0a67f8526e30664c9f7a3cba422bde47087b243495a62ee257b1c36c90bdd65f117d399f63a0fb2f9e90f5d556056927
|
7
|
+
data.tar.gz: 8dd2a4c1892812ab483c0dade82fa4d2e921a837cab489bf8742d7d32f99d822fd25389c887e5289dead692028d81298bb10e1c63179783b99f55366de3b4ad9
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<meta charset="utf-8">
|
6
6
|
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
7
7
|
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
8
|
-
<meta content="The LivingStyleGuide Gem –
|
8
|
+
<meta content="The LivingStyleGuide Gem v<%= LivingStyleGuide::VERSION %> – https://livingstyleguide.org" name="generator">
|
9
9
|
<title><%= ERB::Util.h(title) %></title>
|
10
10
|
<script>
|
11
11
|
// see: http://www.hagenburger.net/BLOG/Simple-HTML5-Fix-for-IE.html
|
@@ -8,7 +8,7 @@ document.addEventListener("DOMContentLoaded", function() {
|
|
8
8
|
selectElementRange(createDiv(this.children[0].innerHTML));
|
9
9
|
}
|
10
10
|
else {
|
11
|
-
var copyHexColors = window.getComputedStyle(this, "
|
11
|
+
var copyHexColors = window.getComputedStyle(this, "::after").getPropertyValue("content");
|
12
12
|
copyHexColors = copyHexColors.replace(/'|"/g, "");
|
13
13
|
selectElementRange(createDiv(copyHexColors));
|
14
14
|
}
|
@@ -1 +1 @@
|
|
1
|
-
<input type="search" class="lsg--search-box" placeholder="<%= placeholder %>"
|
1
|
+
<input type="search" class="lsg--search-box" placeholder="<%= placeholder %>">
|
@@ -21,7 +21,7 @@
|
|
21
21
|
display: block;
|
22
22
|
font-weight: bold;
|
23
23
|
|
24
|
-
|
24
|
+
&::before {
|
25
25
|
content: "> ";
|
26
26
|
}
|
27
27
|
}
|
@@ -57,8 +57,8 @@
|
|
57
57
|
display: inline;
|
58
58
|
vertical-align: baseline;
|
59
59
|
|
60
|
-
|
61
|
-
|
60
|
+
&::before,
|
61
|
+
&::after {
|
62
62
|
content: "";
|
63
63
|
}
|
64
64
|
}
|
@@ -6,3 +6,26 @@
|
|
6
6
|
$color-b 0)
|
7
7
|
repeat 0 0/#{$size} #{$size};
|
8
8
|
}
|
9
|
+
|
10
|
+
@function lsg--str-replace($string, $search, $replace: "") {
|
11
|
+
$index: str-index($string, $search);
|
12
|
+
|
13
|
+
@if $index {
|
14
|
+
@return str-slice($string, 1, $index - 1) + $replace +
|
15
|
+
lsg--str-replace(
|
16
|
+
str-slice($string, $index + str-length($search)),
|
17
|
+
$search, $replace
|
18
|
+
);
|
19
|
+
}
|
20
|
+
|
21
|
+
@return $string;
|
22
|
+
}
|
23
|
+
|
24
|
+
$lsg--escapes: ("(": "\\(", ")": "\\)", "$": "\\$", "#": "\\#");
|
25
|
+
|
26
|
+
@function lsg--escape-selector($selector) {
|
27
|
+
@each $before, $after in $lsg--escapes {
|
28
|
+
$selector: lsg--str-replace($selector, $before, $after);
|
29
|
+
}
|
30
|
+
@return $selector;
|
31
|
+
}
|
@@ -4,15 +4,7 @@ $lsg--variables: () !default;
|
|
4
4
|
$value: null !default;
|
5
5
|
|
6
6
|
@if $value != null {
|
7
|
-
$selector: $variable;
|
8
|
-
|
9
|
-
@if str-slice($variable, 1, 1) == "$" or str-slice($variable, 1, 1) == "#" {
|
10
|
-
$selector: "\\" + $selector;
|
11
|
-
}
|
12
|
-
|
13
|
-
@if str-slice($variable, -2, -1) == "()" {
|
14
|
-
$selector: str-slice($variable, 1, -3) + "\\(\\)";
|
15
|
-
}
|
7
|
+
$selector: lsg--escape-selector($variable);
|
16
8
|
|
17
9
|
.#{$selector} {
|
18
10
|
@if type-of($value) == color {
|
@@ -33,12 +25,12 @@ $lsg--variables: () !default;
|
|
33
25
|
}
|
34
26
|
}
|
35
27
|
|
36
|
-
|
28
|
+
&::before {
|
37
29
|
background-color: $value;
|
38
30
|
}
|
39
31
|
}
|
40
32
|
|
41
|
-
|
33
|
+
&::after {
|
42
34
|
@extend %lsg--code !optional;
|
43
35
|
content: "#{inspect($value)}";
|
44
36
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: livingstyleguide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.pre.
|
4
|
+
version: 2.0.0.pre.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nico Hagenburger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minisyntax
|
@@ -299,3 +299,4 @@ signing_key:
|
|
299
299
|
specification_version: 4
|
300
300
|
summary: Generate beautiful front-end style guides
|
301
301
|
test_files: []
|
302
|
+
has_rdoc:
|