Skip to content

Commit

Permalink
fix(clearFix): Fixes an issue with content being blank.
Browse files Browse the repository at this point in the history
Fixes an issue with clearFix where `content` was blank due to the empty quotes being parsed as a

null value.

#140
  • Loading branch information
bhough committed Apr 24, 2017
1 parent 7bed38c commit bb19bf1
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 80 deletions.
18 changes: 9 additions & 9 deletions docs/assets/polished.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function modularScale(steps) {
var base = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '1em';
var ratio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'perfectFourth';

if (!steps) {
if (typeof steps !== 'number') {
throw new Error('Please provide a number of steps to the modularScale helper.');
}
if (typeof ratio === 'string' && !ratioNames[ratio]) {
Expand All @@ -233,7 +233,7 @@ function modularScale(steps) {
throw new Error('Invalid value passed as base to modularScale, expected number or em string but got "' + base + '"');
}

return realBase * realRatio * steps + 'em';
return realBase * Math.pow(realRatio, steps) + 'em';
}

//
Expand Down Expand Up @@ -411,7 +411,7 @@ var taggedTemplateLiteral = function (strings, raw) {
*
* '&::after': {
* 'clear': 'both',
* 'content': '',
* 'content': '""',
* 'display': 'table'
* }
*/
Expand All @@ -422,7 +422,7 @@ function clearFix() {
var pseudoSelector = parent + '::after';
return defineProperty({}, pseudoSelector, {
'clear': 'both',
'content': '',
'content': '""',
'display': 'table'
});
}
Expand Down Expand Up @@ -1042,7 +1042,7 @@ var functionsMap = {
/** */

/**
* String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).
* String to represent commong easing functions as demonstrated here: (github.com/jaukia/easie).
*
* @example
* // Styles as object usage
Expand Down Expand Up @@ -1161,10 +1161,10 @@ function hslToRgb(hue, saturation, lightness) {

var hexRegex = /^#[a-fA-F0-9]{6}$/;
var reducedHexRegex = /^#[a-fA-F0-9]{3}$/;
var rgbRegex = /^rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)$/;
var rgbaRegex = /^rgba\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3}), ?([-+]?[0-9]*[.]?[0-9]+)\)$/;
var hslRegex = /^hsl\((\d{1,3}), ?(\d{1,3})%, ?(\d{1,3})%\)$/;
var hslaRegex = /^hsla\((\d{1,3}), ?(\d{1,3})%, ?(\d{1,3})%, ?([-+]?[0-9]*[.]?[0-9]+)\)$/;
var rgbRegex = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;
var rgbaRegex = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/;
var hslRegex = /^hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/;
var hslaRegex = /^hsla\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/;

/**
* Returns an RgbColor or RgbaColor object. This utility function is only useful
Expand Down

0 comments on commit bb19bf1

Please sign in to comment.