Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
851 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | "use strict";
|
---|
| 2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
| 3 | var tslib_1 = require("tslib");
|
---|
| 4 | var node_1 = tslib_1.__importDefault(require("./node"));
|
---|
| 5 | var _noSpaceCombinators = {
|
---|
| 6 | '': true,
|
---|
| 7 | ' ': true,
|
---|
| 8 | '|': true
|
---|
| 9 | };
|
---|
| 10 | var Combinator = function (value) {
|
---|
| 11 | if (value === ' ') {
|
---|
| 12 | this.value = ' ';
|
---|
| 13 | this.emptyOrWhitespace = true;
|
---|
| 14 | }
|
---|
| 15 | else {
|
---|
| 16 | this.value = value ? value.trim() : '';
|
---|
| 17 | this.emptyOrWhitespace = this.value === '';
|
---|
| 18 | }
|
---|
| 19 | };
|
---|
| 20 | Combinator.prototype = Object.assign(new node_1.default(), {
|
---|
| 21 | type: 'Combinator',
|
---|
| 22 | genCSS: function (context, output) {
|
---|
| 23 | var spaceOrEmpty = (context.compress || _noSpaceCombinators[this.value]) ? '' : ' ';
|
---|
| 24 | output.add(spaceOrEmpty + this.value + spaceOrEmpty);
|
---|
| 25 | }
|
---|
| 26 | });
|
---|
| 27 | exports.default = Combinator;
|
---|
| 28 | //# sourceMappingURL=combinator.js.map |
---|
Note:
See
TracBrowser
for help on using the repository browser.