Skip to content

CSS selector revamp #72

@gezakerecsenyi

Description

@gezakerecsenyi

Replace NOT block with:

  "type": "cssnot",
  "message0": ":not( %1 ) %2",
  "args0": [
    {
      "type": "input_value",
      "name": "not",
      "check": "cssexpression"
    },
    {
      "type": "input_value",
      "name": "modifier",
      "check": "cssexpression"
    }
  ],
  "output": "cssevents",
  "colour": 290,
  "tooltip": "CSS 'Not' container",
  "helpUrl": "https://www.w3schools.com/cssref/css_selectors.asp"
}

Add:

  "type": "cssjoin",
  "message0": "%1 %2",
  "args0": [
    {
      "type": "field_dropdown",
      "name": "selector",
      "options": [
        [
          ",",
          ","
        ],
        [
          ">",
          ">"
        ],
        [
          "+",
          "+"
        ],
        [
          "~",
          "~"
        ]
      ]
    },
    {
      "type": "input_value",
      "name": "modifier",
      "check": "cssexpression"
    }
  ],
  "output": "cssevents",
  "colour": 290,
  "tooltip": "CSS expression joiner",
  "helpUrl": "https://www.w3schools.com/cssref/css_selectors.asp"
}
  "type": "cssnth",
  "message0": ":nth- %1 ( %2 ) %3",
  "args0": [
    {
      "type": "field_dropdown",
      "name": "nthwhat",
      "options": [
        [
          "child",
          "child"
        ],
        [
          "last-child",
          "last-child"
        ],
        [
          "last-of-type",
          "last-of-type"
        ]
      ]
    },
    {
      "type": "field_number",
      "name": "n",
      "value": 1
    },
    {
      "type": "input_value",
      "name": "modifier",
      "check": "cssexpression"
    }
  ],
  "output": "cssevents",
  "colour": 290,
  "tooltip": "CSS nth-item function",
  "helpUrl": "https://www.w3schools.com/cssref/css_selectors.asp"
}
  "type": "cssnth",
  "message0": "%1 %2",
  "args0": [
    {
      "type": "field_input",
      "name": "selector",
      "text": "selector"
    },
    {
      "type": "input_value",
      "name": "modifier",
      "check": "cssexpression"
    }
  ],
  "output": "cssexpression",
  "colour": 290,
  "tooltip": "CSS expression joiner",
  "helpUrl": "https://www.w3schools.com/cssref/css_selectors.asp"
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions