flint-gs 1.6.3 → 1.6.4

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: e7237e782b4c94642d2476f469a73f69bb2b8706
4
- data.tar.gz: 711ed0e151e8e5bd31b9ec158eca87eebd1e8d6f
3
+ metadata.gz: bc6705aa106a19b5f55ad1123703a9a3f0a2c649
4
+ data.tar.gz: e06d8629855c1b3c4817f73016f9fdcfe3733c2d
5
5
  SHA512:
6
- metadata.gz: 9ac60c7a3e67f7fd08e39ee5f104acb6f46836767af8478941ec3b28772640dc51050987d258c399a7ab0fc99fc2914c4e4b7e075c4b0bdf0568f0b81010ec36
7
- data.tar.gz: d67df883bb8d0bfed43c79ab2b1f860951640369e6c203a045c39705e351c38170d75f33735faf95fa49bfeb987f7d9f19cb6ca001e7d532c4065bd94d503f31
6
+ metadata.gz: 5a0538609ef8c9f50139ec4910f67c3c33cfb4d311f526907315a0a7447e4aad8850e1ead94b3006a73e2c22ecb31c25eeeb2a7990081ee699ee9c398789d140
7
+ data.tar.gz: 27e157ec567e5937c5c6ec2fd188325454d59b76abc4a3ff8666232df4890e69883d36fbba99c610a78d3bee6550e17d6c8fd0180fffcad52794a8a484ce9822
data/README.md CHANGED
@@ -861,8 +861,13 @@ function parses the selector string (for example, `.block__element__element`) li
861
861
  // @return [list] : parsed list of selectors according to syntax
862
862
 
863
863
  @function support-syntax-bem($selectors) {
864
- $selectors: string-to-list($selectors, "_");
864
+ // Clean up selector, remove double underscores for spaces
865
+ $selectors: replace-substring($selectors, "__");
866
+ // Parse string to list
867
+ $selectors: string-to-list($selectors);
868
+ // Define top-most parent of selector
865
869
  $parent: nth($selectors, 1);
870
+ // Create new list of parsed selectors
866
871
  $selector-list: ($parent);
867
872
 
868
873
  // Loop over each selector and build list of selectors
data/lib/flint.rb CHANGED
@@ -5,7 +5,7 @@ Compass::Frameworks.register('flint', :path => extension_path)
5
5
  # Version is a number. If a version contains alphas, it will be created as a prerelease version
6
6
  # Date is in the form of YYYY-MM-DD
7
7
  module Flint
8
- VERSION = "1.6.3"
8
+ VERSION = "1.6.4"
9
9
  DATE = "2014-07-08"
10
10
  end
11
11
 
@@ -3,31 +3,23 @@
3
3
  // @param $string [string] : string that contains substring
4
4
  // @param $substring [string] : substring to replace
5
5
  // @param $new-substring [string] : new string to replace sub with
6
- // @param $recursive [bool] : recursively replace all substrings
7
6
  // -------------------------------------------------------------------------------
8
7
  // @return [string]
9
8
 
10
- @function replace-substring($string, $substring, $new-substring: " ", $recursive: true) {
9
+ @function replace-substring($string, $substring, $new-substring: " ") {
11
10
  // Loop through length of string
12
11
  @for $i from 1 through str-length($string) {
13
-
14
- // Get index and length of substring
15
- $sub-index: str-index($string, $substring);
16
- $sub-length: str-length($substring);
12
+ // Get index and length of substring
13
+ $sub-index: str-index($string, $substring);
14
+ $sub-length: str-length($substring);
17
15
 
18
16
  // If count is index of substring
19
17
  @if $i == $sub-index {
20
-
21
18
  // Slice string to exclude substring
22
19
  $string-before: str-slice($string, 1, $i - 1);
23
20
  $string-after: str-slice($string, $i + $sub-length, str-length($string));
24
-
25
21
  // Create new string
26
22
  $string: $string-before + $new-substring + $string-after;
27
-
28
- @if $recursive {
29
- $string: replace-substring($string, $substring, $new-substring);
30
- }
31
23
  }
32
24
 
33
25
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flint-gs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.3
4
+ version: 1.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezekiel Gabrielse