From a3cdf182c9aad5b754b567fdfbf624fe7201372a Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Wed, 16 Dec 2009 08:40:08 -0800 Subject: [PATCH] [Compass Core] +min-height, +min-width, and +bang-hack mixins --- .../compass/utilities/general/_hacks.sass | 9 +++++++++ .../compass/utilities/general/_min.sass | 17 +++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_min.sass diff --git a/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_hacks.sass b/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_hacks.sass index e3c21fb5..ed2759f2 100644 --- a/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_hacks.sass +++ b/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_hacks.sass @@ -4,3 +4,12 @@ // and this puts it back to block & display: block + +//** + IE6 will let the !important property win + While all the other browsers won't. + TODO: link to blog post +=bang-hack(!property, !hack_value, !value) + #{!property}: #{!hack_value} !important + #{!property}: #{!value} + diff --git a/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_min.sass b/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_min.sass new file mode 100644 index 00000000..5f454547 --- /dev/null +++ b/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_min.sass @@ -0,0 +1,17 @@ +@import hacks.sass + +//** + Cross browser min-height mixin. +=min-height(!value) + +hacked-minimum("height", !value) + +//** + Cross browser min-width mixin. +=min-width(!value) + +hacked-minimum("width", !value) + +// @private This mixin is not meant to be used directly. +=hacked-minimum(!property, !value) + min-#{!property}= !value + +bang-hack(!property, !value, 'auto') +