Cypress · Matcher
have.css
have.css checks a DOM element's CSS property, with an optional expected value. Cypress retries the assertion until the value matches or the command times out.
Last updated
Syntax
.should('have.css', property, value)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
shouldandnot.have.csscy.getcy.containsVisibility