livingstyleguide 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9f9ec9a2f50a6012fce8d84f1fd0aef0c616d62
4
- data.tar.gz: 0e7ad2d54e8f67764d00a47560dbd4df11e9deae
3
+ metadata.gz: 64d0ec41b42dadbe947678ebd984e301e485fa4e
4
+ data.tar.gz: 74e04eebfc9a2829c85ba534caa431277cbba4ed
5
5
  SHA512:
6
- metadata.gz: e5ac373b58c44cde3fb603723b725bd04ba93e414310380908e40b211261905d52d4652cdc38e625c6798529698a3c71e1bc7da47adaa1f4d412c26c50edce43
7
- data.tar.gz: d51ea446407586d2c6d98135a8db635e24e65de31b75ea4ead48fa4f345a5c2a1d76b2f744492f053b65857f482554dc5481baea9ebef4c29abd7f57b2c3a800
6
+ metadata.gz: bea3fded45a579b817c355b22c2dbb3f88635c141f11890cbc6fbc4fa53b84cf56b0e31fee577559d8ed8bb1d5b19b07a22e4bf057119a9b14c4838740ac36f6
7
+ data.tar.gz: 970c746c1c852462c66547d328046946e814b198a4780591beacd8a97870450b19ffd889ca804c516faee7a8c6f60f649be88bc6c7c58ae7d02b47476bfbdb10
@@ -9,11 +9,12 @@ LivingStyleGuide::Example.add_filter :font_example do |font|
9
9
  suppress_code_block
10
10
 
11
11
  html do |content|
12
- %(<div class="livingstyleguide--font-example" style="font: #{font}">\n#{content}\n</div>\n)
12
+ %(<div class="livingstyleguide--font-example" style="font: #{ERB::Util.html_escape(font)}">\n#{content}\n</div>\n)
13
13
  end
14
14
 
15
15
  pre_processor do |content|
16
16
  content = options[:font_example][:text] if content == ''
17
+ content = ERB::Util.html_escape(content)
17
18
  content.strip.gsub(/\n/, "<br>\n")
18
19
  end
19
20
  end
@@ -1,3 +1,4 @@
1
1
  require 'livingstyleguide/integration/compass'
2
2
  require 'livingstyleguide/integration/rails'
3
+ require 'livingstyleguide/integration/sprockets'
3
4
 
@@ -0,0 +1,6 @@
1
+ begin
2
+ require 'sprockets'
3
+ Sprockets.register_engine('.lsg', ::Tilt::LivingStyleGuideTemplate)
4
+ rescue LoadError
5
+ end
6
+
@@ -44,6 +44,7 @@ module LivingStyleGuide
44
44
  end
45
45
 
46
46
  def self.variables(uri)
47
+ uri = uri.dup
47
48
  uri += '.s?ss' unless uri =~ /\.s[ac]ss$/
48
49
  uri.gsub! %r{^(.*)/(.+)$}, '\1/{_,}\2'
49
50
  variables = []
@@ -1,6 +1,6 @@
1
1
  <% variables.each do |variable| %>
2
2
  $<%= variable %>: null !default;
3
- @if $<%= variable %> != null {
3
+ @if $<%= variable %> != null {//and type-of($<%= variable %>) != map {
4
4
  .\$<%= variable %> {
5
5
  @if type-of($<%= variable %>) == color {
6
6
  @if (lightness($<%= variable %>) < lightness($livingstyleguide--color)) {
@@ -14,7 +14,7 @@
14
14
 
15
15
  &:after {
16
16
  @extend %livingstyleguide--code !optional;
17
- content: "#{$<%= variable %>}";
17
+ content: "#{inspect($<%= variable %>)}";
18
18
  }
19
19
  }
20
20
  }
@@ -1,3 +1,3 @@
1
1
  module LivingStyleGuide
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
3
3
  end
@@ -40,6 +40,7 @@
40
40
  .livingstyleguide--anchor {
41
41
  @extend %livingstyleguide--reset;
42
42
  color: inherit;
43
+ display: inline;
43
44
  margin-left: -1em;
44
45
  opacity: 0;
45
46
  position: absolute;
@@ -9,6 +9,7 @@
9
9
  }
10
10
 
11
11
  .livingstyleguide--footer {
12
+ display: block;
12
13
  margin: (4 * $livingstyleguide--gap-width) auto;
13
14
  width: $livingstyleguide--width;
14
15
  }
@@ -26,9 +27,9 @@
26
27
 
27
28
  &:hover {
28
29
  -webkit-transform: translateZ(0);
29
- -webkit-filter: brightness(0.7);
30
- -moz-filter: brightness(0.7);
31
- filter: brightness(0.7);
30
+ -webkit-filter: unquote("brightness(0.7)");
31
+ -moz-filter: unquote("brightness(0.7)");
32
+ filter: unquote("brightness(0.7)");
32
33
  }
33
34
  }
34
35
 
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: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nico Hagenburger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-13 00:00:00.000000000 Z
11
+ date: 2014-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minisyntax
@@ -208,6 +208,7 @@ files:
208
208
  - lib/livingstyleguide/integration.rb
209
209
  - lib/livingstyleguide/integration/compass.rb
210
210
  - lib/livingstyleguide/integration/rails.rb
211
+ - lib/livingstyleguide/integration/sprockets.rb
211
212
  - lib/livingstyleguide/markdown_extensions.rb
212
213
  - lib/livingstyleguide/sass_extensions.rb
213
214
  - lib/livingstyleguide/sass_extensions/functions.rb