Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/rfs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2019-02-17 16:18:43 +0300
committerGitHub <noreply@github.com>2019-02-17 16:18:43 +0300
commit0c30900144d77ffbb2bb39a81e0501baa001c50c (patch)
tree9e733950f2f65bfcc84014c28bfe86055d746f0c /postcss.js
parent2c08bfa9f92484a7faefff6e8e1a2edfc0092f8d (diff)
Rename variable and remove xo suppression. (#92)
Diffstat (limited to 'postcss.js')
-rw-r--r--postcss.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/postcss.js b/postcss.js
index e394a66..9046714 100644
--- a/postcss.js
+++ b/postcss.js
@@ -107,23 +107,23 @@ module.exports = postcss.plugin('postcss-rfs', opts => {
value = `calc(${toFixed(baseFontSize, opts.unitPrecision)}${opts.fontSizeUnit} + ${toFixed(fontSizeDiff * 100 / opts.breakpoint, opts.unitPrecision)}${viewportUnit})`;
const mediaQuery = postcss.atRule(renderMediaQuery(opts));
- let rule_selector = rule.selector;
+ let ruleSelector = rule.selector;
// Prefix with .enable-responsive-font-size class if needed
if (opts.class === 'enable') {
const selectors = rule.selector.split(',');
- let ruleSelector = '';
+ let tempRuleSelector = '';
for (const selector of selectors) {
- ruleSelector += `${ENABLE_RESPONSIVE_FONT_SIZE_SELECTOR} ${selector},\n`;
- ruleSelector += `${selector + ENABLE_RESPONSIVE_FONT_SIZE_SELECTOR},\n`;
+ tempRuleSelector += `${ENABLE_RESPONSIVE_FONT_SIZE_SELECTOR} ${selector},\n`;
+ tempRuleSelector += `${selector + ENABLE_RESPONSIVE_FONT_SIZE_SELECTOR},\n`;
}
- rule_selector = ruleSelector.slice(0, -2);
+ ruleSelector = tempRuleSelector.slice(0, -2);
}
const mediaQueryRule = postcss.rule({
- selector: rule_selector,
+ selector: ruleSelector,
source: rule.source
});