has-nested-state

A state nested under a has argument, which applies to the element carrying sz.

Message

A name in angle brackets is a value the message fills in.

has

[csszyx] has-nested-state: `<state>` under `has: { <argument>: … }` tests this element, not the `<argument>` it contains.
  help: for the `<argument>`, write `has: { '<argument>:<state>': … }`; for this element, `<state>: { has: { <argument>: … } }`.
  docs: https://csszyx.com/e/has-nested-state

group

[csszyx] has-nested-state: `<state>` under `group: { has: { <argument>: … } }` tests this element, not the `<argument>` inside the group.
  help: for the `<argument>`, write `group: { has: { '<argument>:<state>': … } }`; for this element, `<state>: { group: { has: { <argument>: … } } }`.
  docs: https://csszyx.com/e/has-nested-state

peer

[csszyx] has-nested-state: `<state>` under `peer: { has: { <argument>: … } }` tests this element, not the `<argument>` inside the peer.
  help: for the `<argument>`, write `peer: { has: { '<argument>:<state>': … } }`; for this element, `<state>: { peer: { has: { <argument>: … } } }`.
  docs: https://csszyx.com/e/has-nested-state

not

[csszyx] has-nested-state: `<state>` under `not: { has: { <argument>: … } }` tests this element, not the `<argument>` it contains.
  help: for the `<argument>`, write `not: { has: { '<argument>:<state>': … } }`; for this element, `<state>: { not: { has: { <argument>: … } } }`.
  docs: https://csszyx.com/e/has-nested-state

Level

Default: info under recommended, warn under atomic. Set it in csszyx.config: rules: { 'has-nested-state': 'warn' }.

The level sets how the build and csszyx check report it. It does not change a console line, and it does not stop a thrown error.

Arguments

The values this diagnostic names.

NameType
form'has' | 'group' | 'peer' | 'not'
argumentstring
statestring