merge stable
This commit is contained in:
commit
3df5ba3369
@ -5,7 +5,7 @@ body_id: home
|
|||||||
---
|
---
|
||||||
%article
|
%article
|
||||||
%h1#logo Sass Based Functions
|
%h1#logo Sass Based Functions
|
||||||
|
|
||||||
- all_functions.sorted_and_grouped_by_name{|f| f.last.name }.each do |(group, functions)|
|
- all_functions.sorted_and_grouped_by_name{|f| f.last.name }.each do |(group, functions)|
|
||||||
%h3= group
|
%h3= group
|
||||||
%ul
|
%ul
|
||||||
@ -13,12 +13,22 @@ body_id: home
|
|||||||
%li
|
%li
|
||||||
%a{:href=>"#{i.path}#function-#{f.name}"}= f.sass_signature(:html)
|
%a{:href=>"#{i.path}#function-#{f.name}"}= f.sass_signature(:html)
|
||||||
|
|
||||||
|
- sass_function_list = []
|
||||||
%h1#logo All Ruby Based Functions
|
%h1#logo All Ruby Based Functions
|
||||||
|
%h3 Compass Functions
|
||||||
%ul
|
%ul
|
||||||
- Sass::Script::Functions.public_instance_methods.sort_by{|m| m.to_s}.each do |m|
|
- Sass::Script::Functions.public_instance_methods.sort_by{|m| m.to_s}.each do |m|
|
||||||
%li
|
- name = m.to_s.gsub("_","-")
|
||||||
- name = m.to_s.gsub("_","-")
|
- unless name =~ /^\-compass/ # Private Fuctions!
|
||||||
- if i = item_for_function_name(name)
|
- if i = item_for_function_name(name)
|
||||||
%a{:href=>"#{i.path}##{name}"}= name
|
%li
|
||||||
|
%a{:href=>"#{i.path}##{name}"}= name
|
||||||
|
- elsif sass_functions().include? m
|
||||||
|
- sass_function_list << '<a href="http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html#%s-instance_method">%s</a>' % [m.to_s, name]
|
||||||
- else
|
- else
|
||||||
= name
|
%li
|
||||||
|
= name
|
||||||
|
%h3 Sass Functions
|
||||||
|
%ul
|
||||||
|
- sass_function_list.each do |m|
|
||||||
|
%li= m
|
@ -60,7 +60,7 @@ def import_paths
|
|||||||
File.dirname(@item[:stylesheet])),
|
File.dirname(@item[:stylesheet])),
|
||||||
@item[:stylesheet]["/"] ? File.dirname(@item[:stylesheet]) : ""]
|
@item[:stylesheet]["/"] ? File.dirname(@item[:stylesheet]) : ""]
|
||||||
end
|
end
|
||||||
|
|
||||||
paths += Compass::Frameworks::ALL.inject([]) {|m, f| m << f.stylesheets_directory}.map!{|p|[p, '']}
|
paths += Compass::Frameworks::ALL.inject([]) {|m, f| m << f.stylesheets_directory}.map!{|p|[p, '']}
|
||||||
paths
|
paths
|
||||||
end
|
end
|
||||||
@ -183,6 +183,12 @@ def all_functions
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Sass Only Functions from 3.1.10 (Brainy Betty)
|
||||||
|
# Not as elegant, but does the trick.
|
||||||
|
def sass_functions
|
||||||
|
[:rgb, :rgba, :hsl, :hsla, :red, :green, :blue, :hue, :saturation, :lightness, :alpha, :opacity, :opacify, :fade_in, :transparentize, :fade_out, :lighten, :darken, :saturate, :desaturate, :adjust_hue, :adjust_color, :scale_color, :change_color, :mix, :grayscale, :complement, :invert, :unquote, :quote, :type_of, :unit, :unitless, :comparable, :percentage, :round, :ceil, :floor, :abs, :length, :nth, :join, :append, :zip, :index, :if]
|
||||||
|
end
|
||||||
|
|
||||||
def example_items
|
def example_items
|
||||||
@site.cached("examples") do
|
@site.cached("examples") do
|
||||||
@items.select do |i|
|
@items.select do |i|
|
||||||
|
@ -35,8 +35,8 @@ $default-background-clip: padding-box !default;
|
|||||||
@include experimental(background-clip, $clip,
|
@include experimental(background-clip, $clip,
|
||||||
not -moz,
|
not -moz,
|
||||||
not -webkit,
|
not -webkit,
|
||||||
-o,
|
not -o,
|
||||||
-ms,
|
not -ms,
|
||||||
-khtml,
|
-khtml,
|
||||||
official
|
official
|
||||||
);
|
);
|
||||||
|
@ -19,7 +19,7 @@ module Compass::SassExtensions::Functions::Trig
|
|||||||
private
|
private
|
||||||
def trig(operation, number)
|
def trig(operation, number)
|
||||||
if number.numerator_units == ["deg"] && number.denominator_units == []
|
if number.numerator_units == ["deg"] && number.denominator_units == []
|
||||||
Sass::Script::Number.new(Math.send(operation, (number.value * Math::PI / 180)))
|
Sass::Script::Number.new(Math.send(operation, Math::PI * number.value / 180))
|
||||||
else
|
else
|
||||||
Sass::Script::Number.new(Math.send(operation, number.value), number.numerator_units, number.denominator_units)
|
Sass::Script::Number.new(Math.send(operation, number.value), number.numerator_units, number.denominator_units)
|
||||||
end
|
end
|
||||||
|
5
test/fixtures/stylesheets/compass/css/background-clip.css
vendored
Normal file
5
test/fixtures/stylesheets/compass/css/background-clip.css
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.background-clip {
|
||||||
|
-moz-background-clip: border;
|
||||||
|
-webkit-background-clip: border;
|
||||||
|
-khtml-background-clip: border-box;
|
||||||
|
background-clip: border-box; }
|
3
test/fixtures/stylesheets/compass/sass/background-clip.scss
vendored
Normal file
3
test/fixtures/stylesheets/compass/sass/background-clip.scss
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
@import "compass/css3/background-clip";
|
||||||
|
|
||||||
|
.background-clip { @include background-clip('border-box'); }
|
Loading…
Reference in New Issue
Block a user