scss_beautifier 0.1.11 → 0.1.12

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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/data/default_config.yml +3 -2
  4. data/lib/scss_beautifier/cli.rb +1 -1
  5. data/lib/scss_beautifier/config.rb +9 -4
  6. data/lib/scss_beautifier/formatters/base.rb +12 -0
  7. data/lib/scss_beautifier/formatters/border_zero.rb +1 -1
  8. data/lib/scss_beautifier/formatters/color.rb +1 -1
  9. data/lib/scss_beautifier/formatters/debug.rb +1 -1
  10. data/lib/scss_beautifier/formatters/declaration_order.rb +25 -6
  11. data/lib/scss_beautifier/formatters/empty_rule.rb +1 -1
  12. data/lib/scss_beautifier/formatters/leading_zero.rb +1 -1
  13. data/lib/scss_beautifier/formatters/name_format.rb +1 -1
  14. data/lib/scss_beautifier/formatters/property_sort_order.rb +19 -10
  15. data/lib/scss_beautifier/formatters/pseudo_element.rb +1 -1
  16. data/lib/scss_beautifier/formatters/qualifying_element.rb +1 -1
  17. data/lib/scss_beautifier/formatters/selector.rb +1 -1
  18. data/lib/scss_beautifier/formatters/shorthand.rb +1 -1
  19. data/lib/scss_beautifier/formatters/silent_comment.rb +18 -0
  20. data/lib/scss_beautifier/formatters/string_quotes.rb +1 -1
  21. data/lib/scss_beautifier/formatters/trailing_zero.rb +1 -1
  22. data/lib/scss_beautifier/version.rb +1 -1
  23. data/lib/scss_beautifier.rb +4 -4
  24. metadata +4 -26
  25. data/lib/scss_beautifier/formatters/bang_format.rb +0 -21
  26. data/lib/scss_beautifier/formatters/comment.rb +0 -17
  27. data/tmp/bang.scss +0 -3
  28. data/tmp/border0.scss +0 -3
  29. data/tmp/colorkeyword.scss +0 -3
  30. data/tmp/colorshort.scss +0 -3
  31. data/tmp/comments.scss +0 -5
  32. data/tmp/debug.scss +0 -4
  33. data/tmp/declarationorder.scss +0 -31
  34. data/tmp/elseplacement.scss +0 -18
  35. data/tmp/empty.scss +0 -3
  36. data/tmp/leadingzero.scss +0 -17
  37. data/tmp/nameformat.scss +0 -30
  38. data/tmp/pm.scss +0 -228
  39. data/tmp/pm2.scss +0 -235
  40. data/tmp/propertysortorder.scss +0 -19
  41. data/tmp/pseudoelement.scss +0 -13
  42. data/tmp/qualifyingelement.scss +0 -23
  43. data/tmp/selectors.scss +0 -3
  44. data/tmp/shorthand.scss +0 -16
  45. data/tmp/string_quotes.scss +0 -12
  46. data/tmp/test.scss +0 -1
  47. data/tmp/test2.scss +0 -35
  48. data/tmp/trailing_zero.scss +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e7f71a42a3682afc9468bcd8cc534d7f1bd1cba
4
- data.tar.gz: a3de8a7285a55690dc8110212d03aa838395ac50
3
+ metadata.gz: 4cacdeb9773edcced21114f451a09f6fdf1ab2f8
4
+ data.tar.gz: cc990881332e43b2baec78ea1720307580b7c548
5
5
  SHA512:
6
- metadata.gz: 1eb860c7d62d3eeb9de1a71e7457b8e1c1e848d2f9f0833db7f3308f5eb5154b20e33b67279a9f8f445cca1cfd38c0b53c99fa63d9fb57f59e38257ebdd76911
7
- data.tar.gz: acab67c03858e5ba77e3448892a090c01a9848992fdd17c2aef8015c258b63386f4dc0030abb8beaf0096fe5f8f092f87c8b54f612f4c375be9a93e6e0e3e697
6
+ metadata.gz: bf0ff93b2fb26f9cd1fbd514365a95f5adba47d491184575b453c433db315e01abb4d1c59774a55275b9b2611bf7eb8826a461c5131dcf7a90124a8f5f5f0cfc
7
+ data.tar.gz: 51742b30410e53e91c09d0893b78fe9958cb6146f6e8f74ce4e735dac1eeb2f4baaf101f171d6dd3cc289fd20518899a18afb25c178d758b5038e76f4883fad1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- scss_beautifier (0.1.11)
4
+ scss_beautifier (0.1.12)
5
5
  sass (~> 3.4)
6
6
 
7
7
  GEM
@@ -4,7 +4,7 @@ formatters:
4
4
  border_zero:
5
5
  enabled: true
6
6
 
7
- comment:
7
+ silent_comment:
8
8
  enabled: true
9
9
 
10
10
  color:
@@ -20,7 +20,8 @@ formatters:
20
20
  enabled: true
21
21
 
22
22
  declaration_order:
23
- enabled: false
23
+ enabled: true
24
+ sort_order: ["mixindef", "mixin", "prop", "rule", "extend"]
24
25
 
25
26
  # else_placement:
26
27
  # enabled: true
@@ -13,7 +13,7 @@ module SCSSBeautifier
13
13
  config = Config.new(options[:config] || DEFAULT)
14
14
 
15
15
  config.formatters.each do |formatter|
16
- formatter.visit(tree)
16
+ formatter.send(:visit, tree)
17
17
  end
18
18
 
19
19
  output = SCSSBeautifier::Convert.visit(tree, {indent: config.tab_style}, :scss)
@@ -12,14 +12,19 @@ module SCSSBeautifier
12
12
  end
13
13
 
14
14
  def formatters
15
- enabled_formatters = @config["formatters"].select {|_, formatter| formatter["enabled"] }.keys
16
- enabled_formatters.map do |formatter|
17
- SCSSBeautifier::Formatters.const_get(formatter.split("_").map(&:capitalize).join)
15
+ enabled_formatters = []
16
+ @config["formatters"].each do |formatter, options|
17
+ if options["enabled"]
18
+ klass = SCSSBeautifier::Formatters.const_get(formatter.split("_").map(&:capitalize).join)
19
+ enabled_formatters << klass.new(options)
20
+ end
18
21
  end
22
+ enabled_formatters
19
23
  end
20
24
 
21
25
  def tab_style
22
26
  @config["tab_style"] || " "
23
27
  end
28
+
24
29
  end
25
- end
30
+ end
@@ -0,0 +1,12 @@
1
+ class SCSSBeautifier::Formatters::Base < Sass::Tree::Visitors::Base
2
+
3
+ attr_accessor :options
4
+
5
+ def self.visit(root, options = {})
6
+ new(options).send(:visit, root)
7
+ end
8
+
9
+ def initialize(options = {})
10
+ @options = options
11
+ end
12
+ end
@@ -1,4 +1,4 @@
1
- class SCSSBeautifier::Formatters::BorderZero < Sass::Tree::Visitors::Base
1
+ class SCSSBeautifier::Formatters::BorderZero < SCSSBeautifier::Formatters::Base
2
2
  BORDER_PROPERTIES = %w[
3
3
  border
4
4
  border-top
@@ -1,4 +1,4 @@
1
- class SCSSBeautifier::Formatters::Color < Sass::Tree::Visitors::Base
1
+ class SCSSBeautifier::Formatters::Color < SCSSBeautifier::Formatters::Base
2
2
  def visit_prop(node)
3
3
  if node.value.respond_to?(:each)
4
4
  node.value.each{ |item| format_color(item) }
@@ -1,4 +1,4 @@
1
- class SCSSBeautifier::Formatters::Debug < Sass::Tree::Visitors::Base
1
+ class SCSSBeautifier::Formatters::Debug < SCSSBeautifier::Formatters::Base
2
2
  def visit_rule(node)
3
3
  filtered = node.children.reject do |c|
4
4
  Sass::Tree::DebugNode === c
@@ -1,6 +1,6 @@
1
- class SCSSBeautifier::Formatters::DeclarationOrder < Sass::Tree::Visitors::Base
2
- # TODO: Account for if/else blocks and include blocks
3
- NODE_ORDER = ["ExtendNode", "MixinNode", "PropNode", "RuleNode"]
1
+ class SCSSBeautifier::Formatters::DeclarationOrder < SCSSBeautifier::Formatters::Base
2
+
3
+ DEFAULT_SORT_ORDER = ["mixindef", "extend", "mixin", "prop", "rule"].freeze
4
4
 
5
5
  def visit_rule(node)
6
6
  order_children(node)
@@ -9,15 +9,34 @@ class SCSSBeautifier::Formatters::DeclarationOrder < Sass::Tree::Visitors::Base
9
9
 
10
10
  def order_children(node)
11
11
  node_hash = Hash.new { |h, k| h[k] = [] }
12
+ comment_array = []
12
13
  node.children.each do |child|
13
- hash_key = child.class.to_s.split("::").last
14
- node_hash[hash_key] << child
14
+ hash_key = child.class.node_name.to_s
15
+ if hash_key == 'comment'
16
+ comment_array << child
17
+ else
18
+ if comment_array.any?
19
+ node_hash[hash_key] = node_hash[hash_key].concat comment_array
20
+ comment_array = []
21
+ end
22
+ node_hash[hash_key] << child
23
+ end
24
+ end
25
+
26
+ compiled_array = sort_order.reduce([]) do |memo, key|
27
+ memo.concat(node_hash[key])
15
28
  end
16
29
 
17
- compiled_array = NODE_ORDER.reduce([]) do |memo, key|
30
+ (node_hash.keys - sort_order).reduce(compiled_array) do |memo, key|
18
31
  memo.concat(node_hash[key])
19
32
  end
20
33
 
21
34
  node.children = compiled_array
22
35
  end
36
+
37
+ private
38
+
39
+ def sort_order
40
+ @sort_order ||= options["sort_order"] || DEFAULT_SORT_ORDER
41
+ end
23
42
  end
@@ -1,4 +1,4 @@
1
- class SCSSBeautifier::Formatters::EmptyRule < Sass::Tree::Visitors::Base
1
+ class SCSSBeautifier::Formatters::EmptyRule < SCSSBeautifier::Formatters::Base
2
2
  def visit_root(node)
3
3
  remove_empty_rule(node)
4
4
  yield
@@ -1,4 +1,4 @@
1
- class SCSSBeautifier::Formatters::LeadingZero < Sass::Tree::Visitors::Base
1
+ class SCSSBeautifier::Formatters::LeadingZero < SCSSBeautifier::Formatters::Base
2
2
  # ExcludeZero Only
3
3
  def visit_prop(node)
4
4
  if Sass::Script::Tree::Literal === node.value && Sass::Script::Value::String === node.value.value
@@ -1,4 +1,4 @@
1
- class SCSSBeautifier::Formatters::NameFormat < Sass::Tree::Visitors::Base
1
+ class SCSSBeautifier::Formatters::NameFormat < SCSSBeautifier::Formatters::Base
2
2
  def visit_function(node)
3
3
  check_name(node)
4
4
  end
@@ -1,23 +1,32 @@
1
- class SCSSBeautifier::Formatters::PropertySortOrder < Sass::Tree::Visitors::Base
1
+ class SCSSBeautifier::Formatters::PropertySortOrder < SCSSBeautifier::Formatters::Base
2
2
  def visit_rule(node)
3
3
  order_children(node)
4
4
  visit_children(node)
5
5
  end
6
6
 
7
7
  def order_children(node)
8
- prop_node_indices = []
9
8
  prop_nodes = []
10
- node.children.each_with_index do |child, index|
11
- hash_key = child.class.to_s.split("::").last
12
- if hash_key == 'PropNode'
13
- prop_node_indices << index
14
- prop_nodes << child
9
+ comment_array = []
10
+ node.children.each do |child|
11
+ hash_key = child.class.node_name.to_s
12
+ if hash_key == 'comment'
13
+ comment_array << child
14
+ elsif hash_key == 'prop'
15
+ prop_nodes << comment_array.push(child)
16
+ comment_array = []
15
17
  end
16
18
  end
17
- prop_nodes.sort! { |x,y| x.name[0] <=> y.name[0] }
19
+ prop_nodes.sort! { |x,y| x.last.name[0] <=> y.last.name[0] }
18
20
  # Replace children being respective of other types of props/funcs/etc
19
- prop_nodes.each_with_index do |n, index|
20
- node.children[prop_node_indices[index]] = n
21
+ children = []
22
+ node.children.each do |child|
23
+ hash_key = child.class.node_name.to_s
24
+ if hash_key == 'prop'
25
+ children.concat(prop_nodes.shift)
26
+ elsif hash_key != 'comment'
27
+ children << child
28
+ end
21
29
  end
30
+ node.children = children
22
31
  end
23
32
  end
@@ -1,6 +1,6 @@
1
1
  PSEUDO_ELEMENTS = File.read(File.realpath(File.join(File.dirname(__FILE__), "..", "..", "..", "data", "pseudo_elements.txt"))).split("\n")
2
2
 
3
- class SCSSBeautifier::Formatters::PseudoElement < Sass::Tree::Visitors::Base
3
+ class SCSSBeautifier::Formatters::PseudoElement < SCSSBeautifier::Formatters::Base
4
4
  def visit_rule(node)
5
5
  check_pseudo(node) if node.rule.join.match(/::?/)
6
6
  visit_children(node)
@@ -1,4 +1,4 @@
1
- class SCSSBeautifier::Formatters::QualifyingElement < Sass::Tree::Visitors::Base
1
+ class SCSSBeautifier::Formatters::QualifyingElement < SCSSBeautifier::Formatters::Base
2
2
  def visit_rule(node)
3
3
  check_qualifying_element(node)
4
4
  visit_children(node)
@@ -1,4 +1,4 @@
1
- class SCSSBeautifier::Formatters::Selector < Sass::Tree::Visitors::Base
1
+ class SCSSBeautifier::Formatters::Selector < SCSSBeautifier::Formatters::Base
2
2
  def visit_rule(node)
3
3
  node.rule = node.rule.each do |rule|
4
4
  rule.gsub!(/,/, ",\n") if rule.is_a?(String)
@@ -1,4 +1,4 @@
1
- class SCSSBeautifier::Formatters::Shorthand < Sass::Tree::Visitors::Base
1
+ class SCSSBeautifier::Formatters::Shorthand < SCSSBeautifier::Formatters::Base
2
2
  def visit_prop(node)
3
3
  property_name = node.name.join
4
4
  return unless SHORTHANDABLE_PROPERTIES.include?(property_name)
@@ -0,0 +1,18 @@
1
+ class SCSSBeautifier::Formatters::SilentComment < SCSSBeautifier::Formatters::Base
2
+ def visit_comment(node)
3
+ format_comment(node) if node.type == :normal
4
+ end
5
+
6
+ private
7
+
8
+ def format_comment(node)
9
+ # Remove /* from the beginning
10
+ node.value.first.gsub!(/^\/\*/, "//")
11
+ # Remove */ from the end
12
+ node.value.last.gsub!(/\*\/$/, "")
13
+ node.value.each do |item|
14
+ item.gsub!(/\n/, "\n//") if String === item
15
+ end
16
+ end
17
+
18
+ end
@@ -1,4 +1,4 @@
1
- class SCSSBeautifier::Formatters::StringQuotes < Sass::Tree::Visitors::Base
1
+ class SCSSBeautifier::Formatters::StringQuotes < SCSSBeautifier::Formatters::Base
2
2
  def visit_prop(node)
3
3
  check_quotes(node)
4
4
  visit_children(node)
@@ -1,4 +1,4 @@
1
- class SCSSBeautifier::Formatters::TrailingZero < Sass::Tree::Visitors::Base
1
+ class SCSSBeautifier::Formatters::TrailingZero < SCSSBeautifier::Formatters::Base
2
2
  def visit_prop(node)
3
3
  check_trailing_zero(node)
4
4
  visit_children(node)
@@ -1,3 +1,3 @@
1
1
  module SCSSBeautifier
2
- VERSION = "0.1.11"
2
+ VERSION = "0.1.12"
3
3
  end
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- $:.unshift "/Users/joenatalzia/Sites/tools/sass/lib"
4
-
5
3
  module SCSSBeautifier
6
4
  module Formatters
7
5
  end
@@ -17,11 +15,13 @@ require "scss_beautifier/config"
17
15
  # Our custom SCSS to SCSS converter
18
16
  require "scss_beautifier/convert"
19
17
 
18
+ # Our base formatter
19
+ require "scss_beautifier/formatters/base"
20
+
20
21
  # Formatters
21
- require "scss_beautifier/formatters/bang_format"
22
22
  require "scss_beautifier/formatters/border_zero"
23
23
  require "scss_beautifier/formatters/color"
24
- require "scss_beautifier/formatters/comment"
24
+ require "scss_beautifier/formatters/silent_comment"
25
25
  require "scss_beautifier/formatters/debug"
26
26
  require "scss_beautifier/formatters/declaration_order"
27
27
  require "scss_beautifier/formatters/empty_rule"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scss_beautifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Tse
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-08-31 00:00:00.000000000 Z
12
+ date: 2016-09-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass
@@ -107,10 +107,9 @@ files:
107
107
  - lib/scss_beautifier/cli.rb
108
108
  - lib/scss_beautifier/config.rb
109
109
  - lib/scss_beautifier/convert.rb
110
- - lib/scss_beautifier/formatters/bang_format.rb
110
+ - lib/scss_beautifier/formatters/base.rb
111
111
  - lib/scss_beautifier/formatters/border_zero.rb
112
112
  - lib/scss_beautifier/formatters/color.rb
113
- - lib/scss_beautifier/formatters/comment.rb
114
113
  - lib/scss_beautifier/formatters/debug.rb
115
114
  - lib/scss_beautifier/formatters/declaration_order.rb
116
115
  - lib/scss_beautifier/formatters/empty_rule.rb
@@ -121,34 +120,13 @@ files:
121
120
  - lib/scss_beautifier/formatters/qualifying_element.rb
122
121
  - lib/scss_beautifier/formatters/selector.rb
123
122
  - lib/scss_beautifier/formatters/shorthand.rb
123
+ - lib/scss_beautifier/formatters/silent_comment.rb
124
124
  - lib/scss_beautifier/formatters/string_quotes.rb
125
125
  - lib/scss_beautifier/formatters/trailing_zero.rb
126
126
  - lib/scss_beautifier/options.rb
127
127
  - lib/scss_beautifier/version.rb
128
128
  - scss_beautifier.gemspec
129
- - tmp/bang.scss
130
- - tmp/border0.scss
131
- - tmp/colorkeyword.scss
132
- - tmp/colorshort.scss
133
- - tmp/comments.scss
134
- - tmp/debug.scss
135
- - tmp/declarationorder.scss
136
129
  - tmp/dump.txt
137
- - tmp/elseplacement.scss
138
- - tmp/empty.scss
139
- - tmp/leadingzero.scss
140
- - tmp/nameformat.scss
141
- - tmp/pm.scss
142
- - tmp/pm2.scss
143
- - tmp/propertysortorder.scss
144
- - tmp/pseudoelement.scss
145
- - tmp/qualifyingelement.scss
146
- - tmp/selectors.scss
147
- - tmp/shorthand.scss
148
- - tmp/string_quotes.scss
149
- - tmp/test.scss
150
- - tmp/test2.scss
151
- - tmp/trailing_zero.scss
152
130
  homepage: https://github.com/paperlesspost/scss-beautifier
153
131
  licenses:
154
132
  - MIT
@@ -1,21 +0,0 @@
1
- class SCSSBeautifier::Formatters::BangFormat < Sass::Tree::Visitors::Base
2
- # def visit_extend(node)
3
- # format_bang(node)
4
- # end
5
-
6
- def visit_prop(node)
7
- node.value.each{ |item| format_bang(item) }
8
- end
9
-
10
- # def visit_variable(node)
11
- # format_bang(node)
12
- # end
13
-
14
- def format_bang(item)
15
- if Sass::Script::Tree::Literal === item && Sass::Script::Value::String === item.value
16
- if item.value.value.include?("!")
17
- item.instance_variable_set(:@value, Sass::Script::Value::String.new(item.value.value.gsub(/\s*!\s*/, ' !')))
18
- end
19
- end
20
- end
21
- end
@@ -1,17 +0,0 @@
1
- class SCSSBeautifier::Formatters::Comment < Sass::Tree::Visitors::Base
2
- def visit_comment(node)
3
- # require 'pry'; binding.pry
4
- format_comment(node)# if !node.invisible?
5
- end
6
-
7
- def format_comment(node)
8
- node.value.first.gsub!(/\/\*\s?/, "// ")
9
- node.value.last.gsub!(/\*\//, "")
10
- # require 'pry'; binding.pry
11
- node.value.each do |item|
12
- if String === item
13
- item.gsub!(/\n\s?/, "\n// ")
14
- end
15
- end
16
- end
17
- end
data/tmp/bang.scss DELETED
@@ -1,3 +0,0 @@
1
- .bang_format {
2
- font-size: 10px ! important;
3
- }
data/tmp/border0.scss DELETED
@@ -1,3 +0,0 @@
1
- .border0 {
2
- border: 0;
3
- }
@@ -1,3 +0,0 @@
1
- .color {
2
- color: rebeccapurple;
3
- }
data/tmp/colorshort.scss DELETED
@@ -1,3 +0,0 @@
1
- .color {
2
- color: #f10;
3
- }
data/tmp/comments.scss DELETED
@@ -1,5 +0,0 @@
1
- /*This comment will be output to css output*/
2
- //This is badly formatted
3
- .comments {
4
- font-size: 10px;
5
- }
data/tmp/debug.scss DELETED
@@ -1,4 +0,0 @@
1
- .debug {
2
- @debug 1;
3
- font-size: 1px;
4
- }
@@ -1,31 +0,0 @@
1
- .declaration-order {
2
- color: $brown;
3
- font-size: 15px;
4
-
5
- @include breakpoint($fullscreen);
6
- @include box-shadow(10px);
7
-
8
- @extend %placeholder;
9
-
10
- .rule {
11
- color: $charcoal;
12
-
13
- @extend %placeholder;
14
- @extend %placeholder-2;
15
-
16
- .nested-one-more {
17
- @include box-shadow(10px);
18
-
19
- color: $brown;
20
- font-size: 15px;
21
-
22
- @include breakpoint($fullscreen);
23
-
24
- @extend %placeholder;
25
- }
26
-
27
- transition: transform .5s ease;
28
- }
29
-
30
- @extend %something;
31
- }
@@ -1,18 +0,0 @@
1
- .test-node {
2
- @if 1 > 0 {
3
- color: red;
4
- }
5
- @else if 0 < 1 {
6
- color: blue;
7
- }
8
- @else {
9
- color: blue;
10
-
11
- @if 1 > 0 {
12
- background-color: red;
13
- }
14
- @else if 0 < 1 {
15
- background-color: blue;
16
- }
17
- }
18
- }
data/tmp/empty.scss DELETED
@@ -1,3 +0,0 @@
1
- .empty {
2
-
3
- }
data/tmp/leadingzero.scss DELETED
@@ -1,17 +0,0 @@
1
- .test {
2
- margin: 0.5em;
3
- padding: .25em;
4
- padding: 1em 2em 0.5em 2em;
5
-
6
- .test2 {
7
- margin: 0.5em;
8
- padding: .25em;
9
- padding: 1em 2em 0.5em 2em;
10
- }
11
-
12
- @include breakpoint($full) {
13
- margin: 0.5em;
14
- padding: .25em;
15
- padding: 1em 2em 0.5em 2em;
16
- }
17
- }
data/tmp/nameformat.scss DELETED
@@ -1,30 +0,0 @@
1
- @mixin myMixin1() {
2
- color: $black;
3
- }
4
-
5
- @mixin my-mixin2() {
6
- color: $black;
7
- }
8
-
9
- $someVar1: 'test';
10
- $some-var2: 'test';
11
-
12
- %placeholderOne1 {
13
- color: $black;
14
- }
15
-
16
- %placeholder-one2 {
17
- color: $black;
18
- }
19
-
20
- @function testFunc1($c) {
21
-
22
- }
23
-
24
- @function test-func2($c) {
25
-
26
- }
27
-
28
- @function test_func3($c) {
29
-
30
- }
data/tmp/pm.scss DELETED
@@ -1,228 +0,0 @@
1
- // override styles for typeahead
2
- ul.private-message-dropdown-menu {
3
- border: none;
4
- display: none;
5
- list-style-position: outside;
6
- list-style: none;
7
- overflow-y: auto;
8
- padding: 0 0 5px 0;
9
- position: absolute;
10
- width: 100%;
11
- z-index: 1000;
12
- @include calc( height, '100% - 350px');
13
- @include scrollbar($alto, rgba(0, 0, 0, 0));
14
-
15
- li {
16
- cursor: pointer;
17
- border-bottom: 1px solid $alto;
18
- display: list-item;
19
- margin: 0;
20
- overflow: hidden;
21
- padding: 12px;
22
-
23
- a {
24
- color: $charcoal;
25
- font-size: 16px;
26
-
27
- strong {
28
- font-weight: normal;
29
- }
30
- }
31
-
32
- &.active {
33
- background-color: $alabaster;
34
-
35
- a {
36
- color: $driftwood;
37
- text-decoration: none;
38
- }
39
- }
40
- }
41
- }
42
-
43
- // Private message write a message form
44
- .write-a-message-form {
45
- background: $white;
46
- bottom: 20px;
47
- position: absolute;
48
- @include calc( width, '100% - 40px');
49
- }
50
-
51
- // Private Message pane that holds the conversation (right pane)
52
- .conversation {
53
- padding-bottom: 90px;
54
- position: relative;
55
-
56
- // Each message
57
- .convo {
58
- font-size: 16px;
59
- padding: 15px 20px;
60
- }
61
- }
62
-
63
- // Private message conversation list (right pane)
64
- .private_messages {
65
- overflow-x: hidden!important;
66
- overflow-y: scroll !important;
67
- padding: 30px 0 0 0;
68
- @include calc( height, '100% - 192px');
69
- @include scrollbar($alto, rgba(0, 0, 0, 0));
70
-
71
- &::-webkit-scrollbar-thumb {
72
- border: 0;
73
- }
74
- }
75
-
76
- // Private message conversation list div (left pane)
77
- .conversation-list-wrapper {
78
- @include scrollbar($alto, rgba(0, 0, 0, 0));
79
- }
80
-
81
- // The date dividers in Private message conversation
82
- .divider {
83
- text-align: center ! important;
84
-
85
- .divider-time {
86
- background: $white;
87
- color: $silver;
88
- font-size: 14px;
89
- margin: 0 auto;
90
- position: relative;
91
- width: 150px;
92
- z-index: 1;
93
- }
94
-
95
- .divider__fade{
96
- border: none;
97
- height: auto;
98
- position: relative;
99
-
100
- &:after{
101
- bottom: 7px;
102
- content: "";
103
- height: 1px;
104
- left: 0;
105
- position: absolute;
106
- right: 0px;
107
- @include background-image(linear-gradient(left, transparent -6%, $alto, transparent 110%));
108
- }
109
- }
110
- }
111
-
112
- // CTA when user is logged out and trying to view PM page
113
- .blocked-cta {
114
- font-size: 1.30em;
115
- margin: 20px 0;
116
- text-align: center;
117
-
118
- a:active,
119
- a:link,
120
- a:hover,
121
- a:visited {
122
- color: $driftwood;
123
- }
124
- }
125
-
126
- // Host reciever name is special
127
- .host .receiver-name {
128
- color: $driftwood;
129
- }
130
-
131
- // state of the partner
132
- .state {
133
- font-style: italic;
134
- margin-left: 5px;
135
- text-transform: capitalize;
136
-
137
- &.state-attending {
138
- color: $light_green;
139
- }
140
-
141
- &.state-regrets {
142
- color: $cornflower;
143
- }
144
-
145
- &.state-added,
146
- &.state-new,
147
- &.state-opened,
148
- &.state-registered,
149
- &.state-undeliverable {
150
- color: $white;
151
- }
152
- }
153
-
154
- .pvt-msg__submit {
155
- float: right;
156
- margin-top: 10px;
157
- }
158
-
159
- // Write a message form that pertains to a particuliar guest (as opposed to New Recipient view)
160
- .guest-message-form {
161
- margin: 0;
162
-
163
- span {
164
- display: inline-block;
165
- font-size: 16px;
166
- position: absolute;
167
- vertical-align: top;
168
- }
169
-
170
- .search-icon {
171
- position: absolute;
172
- right: 30px;
173
-
174
- .svg-search {
175
- fill: $alto;
176
- height: 18px;
177
- width: 18px;
178
- }
179
- }
180
-
181
- textarea {
182
- overflow-y: hidden;
183
- }
184
- }
185
-
186
- // Search for name input
187
- .new-recipient {
188
- border: 0;
189
- border-bottom: 1px solid $alto;
190
- font-size: 16px;
191
- height: 40px;
192
- line-height: 1em;
193
- margin-top: 0;
194
- padding: 0 0 19px 30px;
195
- width: 100%;
196
- @include input-placeholder {
197
- padding: 0 0 0 1px;
198
- }
199
- }
200
-
201
- // override for signup/login modals
202
- .ui-modal .pane {
203
- padding: 0;
204
- }
205
-
206
- @include breakpoint($fullscreen) {
207
-
208
- // Private message write a message form
209
- .write-a-message-form {
210
- width: 400px;
211
- }
212
- }
213
-
214
- .pvt-msg__header-name {
215
- border-bottom: solid 4px transparent;
216
- color: $charcoal;
217
- display: block;
218
- font-size: 13px;
219
- letter-spacing: 0.15em;
220
- line-height: 1.5em;
221
- margin: 25px auto 0;
222
- min-height: 38px;
223
- padding: 0 7px 18px;
224
- position: relative;
225
- text-transform: uppercase;
226
- width: 70%;
227
- word-wrap: break-word;
228
- }
data/tmp/pm2.scss DELETED
@@ -1,235 +0,0 @@
1
- // override styles for typeahead
2
- ul.private-message-dropdown-menu {
3
- border: none;
4
- display: none;
5
- list-style-position: outside;
6
- list-style: none;
7
- overflow-y: auto;
8
- padding: 0 0 5px 0;
9
- position: absolute;
10
- width: 100%;
11
- z-index: 1000;
12
-
13
- @include calc(height, "100% - 350px");
14
-
15
- @include scrollbar($alto, rgba(0, 0, 0, 0));
16
-
17
- li {
18
- cursor: pointer;
19
- border-bottom: 1px solid $alto;
20
- display: list-item;
21
- margin: 0;
22
- overflow: hidden;
23
- padding: 12px;
24
-
25
- a {
26
- color: $charcoal;
27
- font-size: 16px;
28
-
29
- strong {
30
- font-weight: normal;
31
- }
32
- }
33
-
34
- &.active {
35
- background-color: $alabaster;
36
-
37
- a {
38
- color: $driftwood;
39
- text-decoration: none;
40
- }
41
- }
42
- }
43
- }
44
-
45
- // Private message write a message form
46
- .write-a-message-form {
47
- background: $white;
48
- bottom: 20px;
49
- position: absolute;
50
-
51
- @include calc(width, "100% - 40px");
52
- }
53
-
54
- // Private Message pane that holds the conversation (right pane)
55
- .conversation {
56
- padding-bottom: 90px;
57
- position: relative;
58
-
59
- // Each message
60
- .convo {
61
- font-size: 16px;
62
- padding: 15px 20px;
63
- }
64
- }
65
-
66
- // Private message conversation list (right pane)
67
- .private_messages {
68
- overflow-x: hidden !important;
69
- overflow-y: scroll !important;
70
- padding: 30px 0 0 0;
71
-
72
- @include calc(height, "100% - 192px");
73
-
74
- @include scrollbar($alto, rgba(0, 0, 0, 0));
75
-
76
- &::-webkit-scrollbar-thumb {
77
- border: none;
78
- }
79
- }
80
-
81
- // Private message conversation list div (left pane)
82
- .conversation-list-wrapper {
83
- @include scrollbar($alto, rgba(0, 0, 0, 0));
84
- }
85
-
86
- // The date dividers in Private message conversation
87
- .divider {
88
- text-align: center !important;
89
-
90
- .divider-time {
91
- background: $white;
92
- color: $silver;
93
- font-size: 14px;
94
- margin: 0 auto;
95
- position: relative;
96
- width: 150px;
97
- z-index: 1;
98
- }
99
-
100
- .divider__fade {
101
- border: none;
102
- height: auto;
103
- position: relative;
104
-
105
- &:after {
106
- bottom: 7px;
107
- content: "";
108
- height: 1px;
109
- left: 0;
110
- position: absolute;
111
- right: 0px;
112
-
113
- @include background-image(linear-gradient(left, transparent -6%, $alto, transparent 110%));
114
- }
115
- }
116
- }
117
-
118
- // CTA when user is logged out and trying to view PM page
119
- .blocked-cta {
120
- font-size: 1.30em;
121
- margin: 20px 0;
122
- text-align: center;
123
-
124
- a:active,
125
- a:link,
126
- a:hover,
127
- a:visited {
128
- color: $driftwood;
129
- }
130
- }
131
-
132
- // Host reciever name is special
133
- .host .receiver-name {
134
- color: $driftwood;
135
- }
136
-
137
- // state of the partner
138
- .state {
139
- font-style: italic;
140
- margin-left: 5px;
141
- text-transform: capitalize;
142
-
143
- &.state-attending {
144
- color: $light_green;
145
- }
146
-
147
- &.state-regrets {
148
- color: $cornflower;
149
- }
150
-
151
- &.state-added,
152
- &.state-new,
153
- &.state-opened,
154
- &.state-registered,
155
- &.state-undeliverable {
156
- color: $white;
157
- }
158
- }
159
-
160
- .pvt-msg__submit {
161
- float: right;
162
- margin-top: 10px;
163
- }
164
-
165
- // Write a message form that pertains to a particuliar guest (as opposed to New Recipient view)
166
- .guest-message-form {
167
- margin: 0;
168
-
169
- span {
170
- display: inline-block;
171
- font-size: 16px;
172
- position: absolute;
173
- vertical-align: top;
174
- }
175
-
176
- .search-icon {
177
- position: absolute;
178
- right: 30px;
179
-
180
- .svg-search {
181
- fill: $alto;
182
- height: 18px;
183
- width: 18px;
184
- }
185
- }
186
-
187
- textarea {
188
- overflow-y: hidden;
189
- }
190
- }
191
-
192
- // Search for name input
193
- .new-recipient {
194
- border: none;
195
- border-bottom: 1px solid $alto;
196
- font-size: 16px;
197
- height: 40px;
198
- line-height: 1em;
199
- margin-top: 0;
200
- padding: 0 0 19px 30px;
201
- width: 100%;
202
-
203
- @include input-placeholder {
204
- padding: 0 0 0 1px;
205
- }
206
- }
207
-
208
- // override for signup/login modals
209
- .ui-modal .pane {
210
- padding: 0;
211
- }
212
-
213
- @include breakpoint($fullscreen) {
214
- // Private message write a message form
215
- .write-a-message-form {
216
- width: 400px;
217
- }
218
- }
219
-
220
-
221
- .pvt-msg__header-name {
222
- border-bottom: solid 4px transparent;
223
- color: $charcoal;
224
- display: block;
225
- font-size: 13px;
226
- letter-spacing: 0.15em;
227
- line-height: 1.5em;
228
- margin: 25px auto 0;
229
- min-height: 38px;
230
- padding: 0 7px 18px;
231
- position: relative;
232
- text-transform: uppercase;
233
- width: 70%;
234
- word-wrap: break-word;
235
- }
@@ -1,19 +0,0 @@
1
- .rule1 {
2
- @extend %placeholder;
3
- @extend %placeholder-2;
4
-
5
- color: $black;
6
- padding: 10px;
7
- display: block;
8
- @extend %placeholder2;
9
- text-transform: uppercase;;
10
- margin: 20px 0;
11
-
12
- .secondary-rule {
13
- position: absolute;
14
- display: inline-block;
15
- padding: 10px 0;
16
- @include box-shadow(border-box);
17
- color: $black;
18
- }
19
- }
@@ -1,13 +0,0 @@
1
- .test {
2
- &:before {
3
- color: $something;
4
- }
5
- }
6
-
7
- .selector::after {
8
- color: $somthing;
9
-
10
- &::hover {
11
- background-color: $red;
12
- }
13
- }
@@ -1,23 +0,0 @@
1
- div.class {
2
- color: $green;
3
- }
4
-
5
- .class {
6
- color: $green;
7
- }
8
-
9
- a#id {
10
- color: $green;
11
- }
12
-
13
- #id {
14
- color: $green;
15
- }
16
-
17
- span[data-id="test"] {
18
- color: $green;
19
- }
20
-
21
- [data-id="test"] {
22
- color: $green;
23
- }
data/tmp/selectors.scss DELETED
@@ -1,3 +0,0 @@
1
- .selector1,.selector2,.selector3 {
2
- font-size: 10px;
3
- }
data/tmp/shorthand.scss DELETED
@@ -1,16 +0,0 @@
1
- .test {
2
- border-color: $silver transparent transparent transparent;
3
- margin: 1px 1px 1px 1px;
4
- padding: 1px 5px;
5
- }
6
-
7
- .test2 {
8
- padding: 2px 5px 1px;
9
- margin: 5px 1px 6px 4px;
10
- }
11
-
12
- .more-test {
13
- margin: 10px 2px 4px 2px;
14
- padding: 14px;
15
- border-color: red green red green;
16
- }
@@ -1,12 +0,0 @@
1
- .test {
2
- color: $black;
3
- content: 'hello';
4
- content: "hello";
5
- content: "'hello'";
6
-
7
- .nested-child {
8
- content: 'hello';
9
- content: "hello";
10
- content: "'hello'";
11
- }
12
- }
data/tmp/test.scss DELETED
@@ -1 +0,0 @@
1
- .test { color: #f00;}
data/tmp/test2.scss DELETED
@@ -1,35 +0,0 @@
1
- // hmm
2
- // what #{$version}
3
- // lolnoextra
4
- //
5
- // bad comment
6
- .a {
7
- .nested {
8
- color: #000 ! important;
9
- }
10
-
11
- padding: 1px;
12
- font-size: 12px !important;
13
- border: 0;
14
- }
15
-
16
- .b { border: 0 1px;
17
- }
18
-
19
- .c,.d {
20
- border-bottom: 1px solid $alto;
21
- }
22
-
23
- .space {
24
- @include box-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
25
-
26
- $my-color: #fff;
27
-
28
- color: rgba(0, 0, 0, 0.1);
29
- width: 5+5;content: "hello";
30
- }
31
-
32
- .empty {
33
-
34
- }
35
- // Photos pages svg styles
@@ -1,15 +0,0 @@
1
- .test {
2
- margin: .500em;
3
- margin: .5em;
4
- margin: 1.250em;
5
- margin: .6000000em;
6
- margin: 1.0em;
7
-
8
- .test-2 {
9
- margin: ".500em";
10
- margin: .5em;
11
- margin: "1.250em";
12
- margin: .6000000em;
13
- margin: "1.0em";
14
- }
15
- }