Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rule.parent may be undefined #121

Open
a-x- opened this issue Feb 27, 2018 · 0 comments · May be fixed by #122
Open

rule.parent may be undefined #121

a-x- opened this issue Feb 27, 2018 · 0 comments · May be fixed by #122

Comments

@a-x-
Copy link

a-x- commented Feb 27, 2018

if (rule.parent.type !== "atrule" || !/keyframes$/.test(rule.parent.name)) {

my rule variable
{
    "raws": {
        "before": "",
        "after": "",
        "between": "",
        "semicolon": false,
        "left": "",
        "right": ""
    },
    "type": "rule",
    "nodes": [
        {
            "raws": {
                "before": "",
                "after": "",
                "between": ":",
                "important": "!important"
            },
            "type": "decl",
            "source": {
                "start": {
                    "line": 20,
                    "column": 3
                },
                "input": {
                    "css": ".root {\n  display: inline-flex;\n  font-family: 'Roboto', sans-serif;\n  outline: none;\n  &:focus {\n    box-shadow: 0 0 0 3px white, 0 0 2px 3px;\n  }\n}\n\n.placeholder {\n  color: #aaa;\n  padding-top: 6px;\n  padding-bottom: 8px;\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n\n.value {\n  border-bottom: 1px dashed #000;\n  padding-top: 6px;\n  padding-bottom: 7px;\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n",
                    "file": "/Users/mxtnr/rocket/sun/src/components/material/controls/in-place/bool-in-place.css"
                },
                "end": {
                    "line": 20,
                    "column": 19
                }
            },
            "prop": "padding-top",
            "value": "6px",
            "_autoprefixerDisabled": false,
            "important": false
        },
        {
            "raws": {
                "before": "",
                "after": "",
                "between": ":",
                "important": "!important"
            },
            "type": "decl",
            "source": {
                "start": {
                    "line": 22,
                    "column": 3
                },
                "input": {
                    "css": ".root {\n  display: inline-flex;\n  font-family: 'Roboto', sans-serif;\n  outline: none;\n  &:focus {\n    box-shadow: 0 0 0 3px white, 0 0 2px 3px;\n  }\n}\n\n.placeholder {\n  color: #aaa;\n  padding-top: 6px;\n  padding-bottom: 8px;\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n\n.value {\n  border-bottom: 1px dashed #000;\n  padding-top: 6px;\n  padding-bottom: 7px;\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n",
                    "file": "/Users/mxtnr/rocket/sun/src/components/material/controls/in-place/bool-in-place.css"
                },
                "end": {
                    "line": 22,
                    "column": 18
                }
            },
            "prop": "margin-top",
            "value": "8px",
            "_autoprefixerDisabled": false,
            "important": false
        },
        {
            "raws": {
                "before": "",
                "after": "",
                "between": ":",
                "important": "!important"
            },
            "type": "decl",
            "source": {
                "start": {
                    "line": 23,
                    "column": 3
                },
                "input": {
                    "css": ".root {\n  display: inline-flex;\n  font-family: 'Roboto', sans-serif;\n  outline: none;\n  &:focus {\n    box-shadow: 0 0 0 3px white, 0 0 2px 3px;\n  }\n}\n\n.placeholder {\n  color: #aaa;\n  padding-top: 6px;\n  padding-bottom: 8px;\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n\n.value {\n  border-bottom: 1px dashed #000;\n  padding-top: 6px;\n  padding-bottom: 7px;\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n",
                    "file": "/Users/mxtnr/rocket/sun/src/components/material/controls/in-place/bool-in-place.css"
                },
                "end": {
                    "line": 23,
                    "column": 21
                }
            },
            "prop": "margin-bottom",
            "value": "8px",
            "_autoprefixerDisabled": false,
            "important": false
        }
    ],
    "selector": ".placeholder,.value",
    "lastEach": 2,
    "indexes": {}
}
my css
.root {
  display: inline-flex;
  font-family: 'Roboto', sans-serif;
  outline: none;
  &:focus {
    box-shadow: 0 0 0 3px white, 0 0 2px 3px;
  }
}

.placeholder {
  color: #aaa;
  padding-top: 6px;
  padding-bottom: 8px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.value {
  border-bottom: 1px dashed #000;
  padding-top: 6px;
  padding-bottom: 7px;
  margin-top: 8px;
  margin-bottom: 8px;
}
@a-x- a-x- linked a pull request Feb 27, 2018 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant