Check out example codes for "cypress element css". It will help you in understanding the concepts better.

Code Example 1

cy
  .get('nav')                          // yields <nav>
  .should('be.visible')                // yields <nav>
  .should('have.css', 'font-family')   // yields 'sans-serif'
  .and('match', /serif/)               // yields 'sans-serif'

Learn ReactJs, React Native from akashmittal.com