摘要 |
Embodiments relate to semantic compression of cascading style sheets. Starting with a markup page having markup elements and a reference to a cascading style sheet, based on the reference to the cascading style sheet, the cascading style sheet is retrieved. The cascading style sheet has a plurality of style rules. The cascading style sheet is applied to the markup page to identify one or more of the style rules to be modified or omitted (e.g., rules that are redundant with respect to the markup page or inapplicable to the markup page). A compressed cascading style sheet is generated by excluding the identified rules from the compressed cascading style sheet or modifying the identified rules. The compressed cascading style sheet can then be applied to the markup sheet with similar effect as the uncompressed cascading style sheet. |