Interview Question

What is CSSOM?

CSSOM is the script-accessible object model for CSS rules and computed styles.

💡 Concept ✅ Quick Revision 🎨 CSS

Answer

The CSS Object Model is the API model used to represent and manipulate CSS information. • It exposes style sheets, rules, declarations, and computed styles to scripts. • Changing the CSSOM can cause style recalculation and later rendering work. • The CSSOM is related to, but separate from, the DOM.

💡 Simple Example

const color = getComputedStyle(document.body).color;

⚡ Quick Revision

CSSOM is the script-accessible object model for CSS rules and computed styles.