diff --git a/__pycache__/conftest.cpython-314-pytest-9.0.2.pyc b/__pycache__/conftest.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..1d4f8583 Binary files /dev/null and b/__pycache__/conftest.cpython-314-pytest-9.0.2.pyc differ diff --git a/commit_msg.txt b/commit_msg.txt new file mode 100644 index 00000000..39c90ef4 --- /dev/null +++ b/commit_msg.txt @@ -0,0 +1,11 @@ +Allow @font-face rules nested inside @media rules + +Per MDN's At-Rules Nesting documentation, @font-face is allowed +inside conditional at-rules like @media. However, cssutils was +rejecting them with "This rule is not allowed in CSSMediaRule". + +This moves @font-face from the disallowed rules list to the +factories dict in the CSS text parser, and removes CSSFontFaceRule +from the rejected types in insertRule(). + +Fixes #30 diff --git a/cssutils/__pycache__/__init__.cpython-314.pyc b/cssutils/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 00000000..e29d1f26 Binary files /dev/null and b/cssutils/__pycache__/__init__.cpython-314.pyc differ diff --git a/cssutils/__pycache__/_fetch.cpython-314.pyc b/cssutils/__pycache__/_fetch.cpython-314.pyc new file mode 100644 index 00000000..6fc9e3f1 Binary files /dev/null and b/cssutils/__pycache__/_fetch.cpython-314.pyc differ diff --git a/cssutils/__pycache__/_fetchgae.cpython-314.pyc b/cssutils/__pycache__/_fetchgae.cpython-314.pyc new file mode 100644 index 00000000..325f12b2 Binary files /dev/null and b/cssutils/__pycache__/_fetchgae.cpython-314.pyc differ diff --git a/cssutils/__pycache__/codec.cpython-314.pyc b/cssutils/__pycache__/codec.cpython-314.pyc new file mode 100644 index 00000000..0896c59d Binary files /dev/null and b/cssutils/__pycache__/codec.cpython-314.pyc differ diff --git a/cssutils/__pycache__/cssproductions.cpython-314.pyc b/cssutils/__pycache__/cssproductions.cpython-314.pyc new file mode 100644 index 00000000..fcc9f309 Binary files /dev/null and b/cssutils/__pycache__/cssproductions.cpython-314.pyc differ diff --git a/cssutils/__pycache__/errorhandler.cpython-314.pyc b/cssutils/__pycache__/errorhandler.cpython-314.pyc new file mode 100644 index 00000000..a345e404 Binary files /dev/null and b/cssutils/__pycache__/errorhandler.cpython-314.pyc differ diff --git a/cssutils/__pycache__/helper.cpython-314.pyc b/cssutils/__pycache__/helper.cpython-314.pyc new file mode 100644 index 00000000..9e33c5af Binary files /dev/null and b/cssutils/__pycache__/helper.cpython-314.pyc differ diff --git a/cssutils/__pycache__/parse.cpython-314.pyc b/cssutils/__pycache__/parse.cpython-314.pyc new file mode 100644 index 00000000..c935f091 Binary files /dev/null and b/cssutils/__pycache__/parse.cpython-314.pyc differ diff --git a/cssutils/__pycache__/prodparser.cpython-314.pyc b/cssutils/__pycache__/prodparser.cpython-314.pyc new file mode 100644 index 00000000..8e875da1 Binary files /dev/null and b/cssutils/__pycache__/prodparser.cpython-314.pyc differ diff --git a/cssutils/__pycache__/profiles.cpython-314.pyc b/cssutils/__pycache__/profiles.cpython-314.pyc new file mode 100644 index 00000000..571544aa Binary files /dev/null and b/cssutils/__pycache__/profiles.cpython-314.pyc differ diff --git a/cssutils/__pycache__/script.cpython-314.pyc b/cssutils/__pycache__/script.cpython-314.pyc new file mode 100644 index 00000000..0329a8c4 Binary files /dev/null and b/cssutils/__pycache__/script.cpython-314.pyc differ diff --git a/cssutils/__pycache__/serialize.cpython-314.pyc b/cssutils/__pycache__/serialize.cpython-314.pyc new file mode 100644 index 00000000..64a36fc9 Binary files /dev/null and b/cssutils/__pycache__/serialize.cpython-314.pyc differ diff --git a/cssutils/__pycache__/settings.cpython-314.pyc b/cssutils/__pycache__/settings.cpython-314.pyc new file mode 100644 index 00000000..34ad8b77 Binary files /dev/null and b/cssutils/__pycache__/settings.cpython-314.pyc differ diff --git a/cssutils/__pycache__/tokenize2.cpython-314.pyc b/cssutils/__pycache__/tokenize2.cpython-314.pyc new file mode 100644 index 00000000..e5b68439 Binary files /dev/null and b/cssutils/__pycache__/tokenize2.cpython-314.pyc differ diff --git a/cssutils/__pycache__/util.cpython-314.pyc b/cssutils/__pycache__/util.cpython-314.pyc new file mode 100644 index 00000000..34ddaca4 Binary files /dev/null and b/cssutils/__pycache__/util.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/__init__.cpython-314.pyc b/cssutils/css/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 00000000..068645b2 Binary files /dev/null and b/cssutils/css/__pycache__/__init__.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/colors.cpython-314.pyc b/cssutils/css/__pycache__/colors.cpython-314.pyc new file mode 100644 index 00000000..4b382e50 Binary files /dev/null and b/cssutils/css/__pycache__/colors.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/csscharsetrule.cpython-314.pyc b/cssutils/css/__pycache__/csscharsetrule.cpython-314.pyc new file mode 100644 index 00000000..a2c507cf Binary files /dev/null and b/cssutils/css/__pycache__/csscharsetrule.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/csscomment.cpython-314.pyc b/cssutils/css/__pycache__/csscomment.cpython-314.pyc new file mode 100644 index 00000000..3ec6e476 Binary files /dev/null and b/cssutils/css/__pycache__/csscomment.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/cssfontfacerule.cpython-314.pyc b/cssutils/css/__pycache__/cssfontfacerule.cpython-314.pyc new file mode 100644 index 00000000..7903d021 Binary files /dev/null and b/cssutils/css/__pycache__/cssfontfacerule.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/cssimportrule.cpython-314.pyc b/cssutils/css/__pycache__/cssimportrule.cpython-314.pyc new file mode 100644 index 00000000..742425b2 Binary files /dev/null and b/cssutils/css/__pycache__/cssimportrule.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/cssmediarule.cpython-314.pyc b/cssutils/css/__pycache__/cssmediarule.cpython-314.pyc new file mode 100644 index 00000000..9fd8e8fb Binary files /dev/null and b/cssutils/css/__pycache__/cssmediarule.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/cssnamespacerule.cpython-314.pyc b/cssutils/css/__pycache__/cssnamespacerule.cpython-314.pyc new file mode 100644 index 00000000..8ed7622f Binary files /dev/null and b/cssutils/css/__pycache__/cssnamespacerule.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/csspagerule.cpython-314.pyc b/cssutils/css/__pycache__/csspagerule.cpython-314.pyc new file mode 100644 index 00000000..bef87908 Binary files /dev/null and b/cssutils/css/__pycache__/csspagerule.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/cssproperties.cpython-314.pyc b/cssutils/css/__pycache__/cssproperties.cpython-314.pyc new file mode 100644 index 00000000..7007aae6 Binary files /dev/null and b/cssutils/css/__pycache__/cssproperties.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/cssrule.cpython-314.pyc b/cssutils/css/__pycache__/cssrule.cpython-314.pyc new file mode 100644 index 00000000..986fd8b5 Binary files /dev/null and b/cssutils/css/__pycache__/cssrule.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/cssrulelist.cpython-314.pyc b/cssutils/css/__pycache__/cssrulelist.cpython-314.pyc new file mode 100644 index 00000000..9e278353 Binary files /dev/null and b/cssutils/css/__pycache__/cssrulelist.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/cssstyledeclaration.cpython-314.pyc b/cssutils/css/__pycache__/cssstyledeclaration.cpython-314.pyc new file mode 100644 index 00000000..25dde437 Binary files /dev/null and b/cssutils/css/__pycache__/cssstyledeclaration.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/cssstylerule.cpython-314.pyc b/cssutils/css/__pycache__/cssstylerule.cpython-314.pyc new file mode 100644 index 00000000..8b15db35 Binary files /dev/null and b/cssutils/css/__pycache__/cssstylerule.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/cssstylesheet.cpython-314.pyc b/cssutils/css/__pycache__/cssstylesheet.cpython-314.pyc new file mode 100644 index 00000000..8af32c74 Binary files /dev/null and b/cssutils/css/__pycache__/cssstylesheet.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/cssunknownrule.cpython-314.pyc b/cssutils/css/__pycache__/cssunknownrule.cpython-314.pyc new file mode 100644 index 00000000..56010d89 Binary files /dev/null and b/cssutils/css/__pycache__/cssunknownrule.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/cssvariablesdeclaration.cpython-314.pyc b/cssutils/css/__pycache__/cssvariablesdeclaration.cpython-314.pyc new file mode 100644 index 00000000..42caf944 Binary files /dev/null and b/cssutils/css/__pycache__/cssvariablesdeclaration.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/cssvariablesrule.cpython-314.pyc b/cssutils/css/__pycache__/cssvariablesrule.cpython-314.pyc new file mode 100644 index 00000000..cb7afc78 Binary files /dev/null and b/cssutils/css/__pycache__/cssvariablesrule.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/marginrule.cpython-314.pyc b/cssutils/css/__pycache__/marginrule.cpython-314.pyc new file mode 100644 index 00000000..87d78e4b Binary files /dev/null and b/cssutils/css/__pycache__/marginrule.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/property.cpython-314.pyc b/cssutils/css/__pycache__/property.cpython-314.pyc new file mode 100644 index 00000000..c73c5d29 Binary files /dev/null and b/cssutils/css/__pycache__/property.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/selector.cpython-314.pyc b/cssutils/css/__pycache__/selector.cpython-314.pyc new file mode 100644 index 00000000..eac44cc8 Binary files /dev/null and b/cssutils/css/__pycache__/selector.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/selectorlist.cpython-314.pyc b/cssutils/css/__pycache__/selectorlist.cpython-314.pyc new file mode 100644 index 00000000..89d244a1 Binary files /dev/null and b/cssutils/css/__pycache__/selectorlist.cpython-314.pyc differ diff --git a/cssutils/css/__pycache__/value.cpython-314.pyc b/cssutils/css/__pycache__/value.cpython-314.pyc new file mode 100644 index 00000000..64c5bd94 Binary files /dev/null and b/cssutils/css/__pycache__/value.cpython-314.pyc differ diff --git a/cssutils/css/cssmediarule.py b/cssutils/css/cssmediarule.py index 3ffda543..0e3f0741 100644 --- a/cssutils/css/cssmediarule.py +++ b/cssutils/css/cssmediarule.py @@ -186,10 +186,10 @@ def atrule(expected, seq, token, tokenizer): factories = { '@page': cssutils.css.CSSPageRule, '@media': CSSMediaRule, + '@font-face': cssutils.css.CSSFontFaceRule, } if atval in ( '@charset ', - '@font-face', '@import', '@namespace', '@variables', @@ -320,7 +320,6 @@ def insertRule(self, rule, index=None): # check hierarchy if ( isinstance(rule, cssutils.css.CSSCharsetRule) - or isinstance(rule, cssutils.css.CSSFontFaceRule) or isinstance(rule, cssutils.css.CSSImportRule) or isinstance(rule, cssutils.css.CSSNamespaceRule) or isinstance(rule, cssutils.css.MarginRule) diff --git a/cssutils/stylesheets/__pycache__/__init__.cpython-314.pyc b/cssutils/stylesheets/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 00000000..c6a22960 Binary files /dev/null and b/cssutils/stylesheets/__pycache__/__init__.cpython-314.pyc differ diff --git a/cssutils/stylesheets/__pycache__/medialist.cpython-314.pyc b/cssutils/stylesheets/__pycache__/medialist.cpython-314.pyc new file mode 100644 index 00000000..8d2a406b Binary files /dev/null and b/cssutils/stylesheets/__pycache__/medialist.cpython-314.pyc differ diff --git a/cssutils/stylesheets/__pycache__/mediaquery.cpython-314.pyc b/cssutils/stylesheets/__pycache__/mediaquery.cpython-314.pyc new file mode 100644 index 00000000..8f56607d Binary files /dev/null and b/cssutils/stylesheets/__pycache__/mediaquery.cpython-314.pyc differ diff --git a/cssutils/stylesheets/__pycache__/stylesheet.cpython-314.pyc b/cssutils/stylesheets/__pycache__/stylesheet.cpython-314.pyc new file mode 100644 index 00000000..70807322 Binary files /dev/null and b/cssutils/stylesheets/__pycache__/stylesheet.cpython-314.pyc differ diff --git a/cssutils/stylesheets/__pycache__/stylesheetlist.cpython-314.pyc b/cssutils/stylesheets/__pycache__/stylesheetlist.cpython-314.pyc new file mode 100644 index 00000000..9aae9c80 Binary files /dev/null and b/cssutils/stylesheets/__pycache__/stylesheetlist.cpython-314.pyc differ diff --git a/cssutils/tests/__pycache__/__init__.cpython-314.pyc b/cssutils/tests/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 00000000..c87f2fa0 Binary files /dev/null and b/cssutils/tests/__pycache__/__init__.cpython-314.pyc differ diff --git a/cssutils/tests/__pycache__/basetest.cpython-314.pyc b/cssutils/tests/__pycache__/basetest.cpython-314.pyc new file mode 100644 index 00000000..a434b595 Binary files /dev/null and b/cssutils/tests/__pycache__/basetest.cpython-314.pyc differ diff --git a/cssutils/tests/__pycache__/test_codec.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_codec.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..a899b5e9 Binary files /dev/null and b/cssutils/tests/__pycache__/test_codec.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_csscharsetrule.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_csscharsetrule.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..c570899b Binary files /dev/null and b/cssutils/tests/__pycache__/test_csscharsetrule.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_csscomment.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_csscomment.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..59d49f2a Binary files /dev/null and b/cssutils/tests/__pycache__/test_csscomment.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_cssfontfacerule.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_cssfontfacerule.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..d8835ed5 Binary files /dev/null and b/cssutils/tests/__pycache__/test_cssfontfacerule.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_cssimportrule.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_cssimportrule.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..a5f8360d Binary files /dev/null and b/cssutils/tests/__pycache__/test_cssimportrule.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_cssmediarule.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_cssmediarule.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..717409af Binary files /dev/null and b/cssutils/tests/__pycache__/test_cssmediarule.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_cssnamespacerule.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_cssnamespacerule.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..0809fb85 Binary files /dev/null and b/cssutils/tests/__pycache__/test_cssnamespacerule.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_csspagerule.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_csspagerule.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..ee95f62f Binary files /dev/null and b/cssutils/tests/__pycache__/test_csspagerule.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_cssproperties.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_cssproperties.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..3efc0832 Binary files /dev/null and b/cssutils/tests/__pycache__/test_cssproperties.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_cssrule.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_cssrule.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..9a4f57fd Binary files /dev/null and b/cssutils/tests/__pycache__/test_cssrule.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_cssrulelist.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_cssrulelist.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..580cc5d1 Binary files /dev/null and b/cssutils/tests/__pycache__/test_cssrulelist.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_cssstyledeclaration.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_cssstyledeclaration.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..24a8cdc1 Binary files /dev/null and b/cssutils/tests/__pycache__/test_cssstyledeclaration.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_cssstylerule.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_cssstylerule.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..7db2b23c Binary files /dev/null and b/cssutils/tests/__pycache__/test_cssstylerule.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_cssstylesheet.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_cssstylesheet.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..9ea244e3 Binary files /dev/null and b/cssutils/tests/__pycache__/test_cssstylesheet.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_cssunknownrule.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_cssunknownrule.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..0fd70c59 Binary files /dev/null and b/cssutils/tests/__pycache__/test_cssunknownrule.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_cssutils.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_cssutils.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..20c5b8ec Binary files /dev/null and b/cssutils/tests/__pycache__/test_cssutils.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_cssutilsimport.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_cssutilsimport.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..885b8d6d Binary files /dev/null and b/cssutils/tests/__pycache__/test_cssutilsimport.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_cssvalue.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_cssvalue.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..0520120a Binary files /dev/null and b/cssutils/tests/__pycache__/test_cssvalue.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_cssvariablesdeclaration.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_cssvariablesdeclaration.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..1b238e33 Binary files /dev/null and b/cssutils/tests/__pycache__/test_cssvariablesdeclaration.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_cssvariablesrule.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_cssvariablesrule.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..be283105 Binary files /dev/null and b/cssutils/tests/__pycache__/test_cssvariablesrule.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_domimplementation.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_domimplementation.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..11cd5a91 Binary files /dev/null and b/cssutils/tests/__pycache__/test_domimplementation.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_encutils.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_encutils.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..41f90bdf Binary files /dev/null and b/cssutils/tests/__pycache__/test_encutils.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_errorhandler.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_errorhandler.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..6ab44002 Binary files /dev/null and b/cssutils/tests/__pycache__/test_errorhandler.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_helper.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_helper.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..54cb8e38 Binary files /dev/null and b/cssutils/tests/__pycache__/test_helper.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_marginrule.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_marginrule.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..88a15ac0 Binary files /dev/null and b/cssutils/tests/__pycache__/test_marginrule.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_medialist.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_medialist.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..07a8ce11 Binary files /dev/null and b/cssutils/tests/__pycache__/test_medialist.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_mediaquery.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_mediaquery.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..05881286 Binary files /dev/null and b/cssutils/tests/__pycache__/test_mediaquery.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_parse.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_parse.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..4fe9ac9d Binary files /dev/null and b/cssutils/tests/__pycache__/test_parse.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_prodparser.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_prodparser.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..2661786c Binary files /dev/null and b/cssutils/tests/__pycache__/test_prodparser.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_profiles.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_profiles.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..291083f6 Binary files /dev/null and b/cssutils/tests/__pycache__/test_profiles.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_properties.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_properties.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..917c8d8a Binary files /dev/null and b/cssutils/tests/__pycache__/test_properties.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_property.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_property.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..cf225f51 Binary files /dev/null and b/cssutils/tests/__pycache__/test_property.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_scripts_csscombine.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_scripts_csscombine.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..df12a72e Binary files /dev/null and b/cssutils/tests/__pycache__/test_scripts_csscombine.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_selector.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_selector.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..f6395ece Binary files /dev/null and b/cssutils/tests/__pycache__/test_selector.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_selectorlist.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_selectorlist.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..89048683 Binary files /dev/null and b/cssutils/tests/__pycache__/test_selectorlist.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_serialize.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_serialize.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..4e6a80a7 Binary files /dev/null and b/cssutils/tests/__pycache__/test_serialize.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_settings.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_settings.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..f0b276cc Binary files /dev/null and b/cssutils/tests/__pycache__/test_settings.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_stylesheet.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_stylesheet.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..67d83808 Binary files /dev/null and b/cssutils/tests/__pycache__/test_stylesheet.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_tokenize2.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_tokenize2.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..b7353782 Binary files /dev/null and b/cssutils/tests/__pycache__/test_tokenize2.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_util.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_util.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..39a0112f Binary files /dev/null and b/cssutils/tests/__pycache__/test_util.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_value.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_value.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..15775dec Binary files /dev/null and b/cssutils/tests/__pycache__/test_value.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/__pycache__/test_x.cpython-314-pytest-9.0.2.pyc b/cssutils/tests/__pycache__/test_x.cpython-314-pytest-9.0.2.pyc new file mode 100644 index 00000000..347eed8d Binary files /dev/null and b/cssutils/tests/__pycache__/test_x.cpython-314-pytest-9.0.2.pyc differ diff --git a/cssutils/tests/test_cssmediarule.py b/cssutils/tests/test_cssmediarule.py index 42020d05..fc60f668 100644 --- a/cssutils/tests/test_cssmediarule.py +++ b/cssutils/tests/test_cssmediarule.py @@ -429,6 +429,24 @@ def test_incomplete(self): } self.do_equal_p(tests) # parse + def test_fontface_in_media_rule(self): + "CSSMediaRule with nested @font-face (issue #30)" + css = '@media screen { @font-face { font-family: x } }' + sheet = cssutils.parseString(css) + rule = sheet.cssRules[0] + assert isinstance(rule, cssutils.css.CSSMediaRule) + assert len(rule.cssRules) == 1 + assert isinstance(rule.cssRules[0], cssutils.css.CSSFontFaceRule) + assert rule.cssRules[0].style.getPropertyValue('font-family') == 'x' + + # also test insertRule programmatically + r = cssutils.css.CSSMediaRule() + fontface = cssutils.css.CSSFontFaceRule() + fontface.style.setProperty('font-family', 'test') + r.insertRule(fontface) + assert len(r.cssRules) == 1 + assert isinstance(r.cssRules[0], cssutils.css.CSSFontFaceRule) + def test_reprANDstr(self): "CSSMediaRule.__repr__(), .__str__()" mediaText = 'tv, print' diff --git a/encutils/__pycache__/__init__.cpython-314.pyc b/encutils/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 00000000..34dac887 Binary files /dev/null and b/encutils/__pycache__/__init__.cpython-314.pyc differ