Skip to content

rule.parent may be undefined #121

Open
@a-x-

Description

@a-x-

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions