css-parser 1.1.0__tar.gz → 1.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {css_parser-1.1.0/src/css_parser.egg-info → css_parser-1.1.1}/PKG-INFO +1 -1
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_serialize.py +14 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/__init__.py +1 -1
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/serialize.py +3 -0
- {css_parser-1.1.0 → css_parser-1.1.1/src/css_parser.egg-info}/PKG-INFO +1 -1
- {css_parser-1.1.0 → css_parser-1.1.1}/COPYING +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/COPYING.LESSER +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/MANIFEST.in +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/README.md +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/__init__.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/basetest.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/096.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/097.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/1.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/1ascii.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/1import.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/1inherit-ascii.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/1inherit-iso.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/1inherit-utf8.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/1utf.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/2inherit-iso.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/2resolve.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/acid2.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/all.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/atrule.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/bad.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/basic.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/bundle.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/cases.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/csscombine-1.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/csscombine-2.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/csscombine-proxy.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/cthedot_default.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/default_html4.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/hacks.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/html.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/html20.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/html40.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/import/import-impossible.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/import/import2.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/import.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/import3.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/ll.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/ll2.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/multiple-values.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/page_test.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/sample_5.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/sample_7.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/simple.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/single-color.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/slashcode.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/t-HACKS.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/test-unicode.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/test.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/tigris.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/tigris2.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/u_simple.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/v_simple.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/var/start.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/var/use.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/var/vars.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/var/vars2.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/vars.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/varsimport.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/xhtml2.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/xhtml22.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/sheets/yuck.css +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_codec.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_csscharsetrule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_csscomment.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_cssfontfacerule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_cssimportrule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_cssmediarule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_cssnamespacerule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_csspagerule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_cssproperties.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_cssrule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_cssrulelist.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_cssstyledeclaration.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_cssstylerule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_cssstylesheet.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_cssunknownrule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_cssutils.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_cssutilsimport.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_cssvalue.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_cssvariablesdeclaration.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_cssvariablesrule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_domimplementation.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_encutils.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_errorhandler.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_helper.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_marginrule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_medialist.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_mediaquery.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_parse.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_prodparser.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_profiles.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_properties.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_property.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_scripts_csscombine.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_selector.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_selectorlist.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_settings.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_stylesheet.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_tokenize2.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_util.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_value.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/css_parser_tests/test_x.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/pyproject.toml +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/run_tests.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/setup.cfg +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/_fetch.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/_fetchgae.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/codec.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/__init__.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/colors.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/csscharsetrule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/csscomment.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/cssfontfacerule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/cssimportrule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/cssmediarule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/cssnamespacerule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/csspagerule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/cssproperties.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/cssrule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/cssrulelist.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/cssstyledeclaration.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/cssstylerule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/cssstylesheet.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/cssunknownrule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/cssvalue.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/cssvariablesdeclaration.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/cssvariablesrule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/marginrule.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/property.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/selector.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/selectorlist.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/css/value.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/cssproductions.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/encutils/__init__.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/errorhandler.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/helper.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/parse.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/prodparser.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/profiles.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/sac.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/script.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/scripts/__init__.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/scripts/csscapture.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/scripts/csscombine.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/scripts/cssparse.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/settings.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/stylesheets/__init__.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/stylesheets/medialist.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/stylesheets/mediaquery.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/stylesheets/stylesheet.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/stylesheets/stylesheetlist.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/tokenize2.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser/util.py +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser.egg-info/SOURCES.txt +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser.egg-info/dependency_links.txt +0 -0
- {css_parser-1.1.0 → css_parser-1.1.1}/src/css_parser.egg-info/top_level.txt +0 -0
|
@@ -142,6 +142,20 @@ prefix|x, a + b > c ~ d, b {
|
|
|
142
142
|
s = css_parser.parseString('a{x:%s}' % test)
|
|
143
143
|
self.assertEqual(('a {\n x: %s\n }' % exp).encode(), s.cssText)
|
|
144
144
|
|
|
145
|
+
def test_level4_selector_serialization(self):
|
|
146
|
+
for test, expected in {
|
|
147
|
+
'p:has(+ p)': 'p:has(+ p)',
|
|
148
|
+
'.p:has(+ .p)': '.p:has(+ .p)',
|
|
149
|
+
}.items():
|
|
150
|
+
css_parser.ser.prefs.useDefaults()
|
|
151
|
+
s = css_parser.parseString(f'{test} {{ color: red }}')
|
|
152
|
+
actual = s.cssText.decode()
|
|
153
|
+
self.assertEqual(expected, actual[:actual.index('{')].strip(), f'for selector: {test}')
|
|
154
|
+
css_parser.ser.prefs.useMinified()
|
|
155
|
+
s = css_parser.parseString(f'{test} {{ color: red }}')
|
|
156
|
+
actual = s.cssText.decode()
|
|
157
|
+
self.assertEqual(expected.replace(' ', ''), actual[:actual.index('{')].strip(), f'minified: for selector: {test}')
|
|
158
|
+
|
|
145
159
|
def test_useMinified(self):
|
|
146
160
|
"Preferences.useMinified()"
|
|
147
161
|
css_parser.ser.prefs.useDefaults()
|
|
@@ -855,6 +855,9 @@ class CSSSerializer(object):
|
|
|
855
855
|
text = sel.selectorText
|
|
856
856
|
if text.startswith('* '):
|
|
857
857
|
text = text[2:]
|
|
858
|
+
elif text.startswith(('*+', '*>', '*~')):
|
|
859
|
+
# Handle minified case where * is directly adjacent to combinator
|
|
860
|
+
text = text[1:]
|
|
858
861
|
parts.append(text)
|
|
859
862
|
sep = ',%s' % self.prefs.listItemSpacer
|
|
860
863
|
inner = sep.join(parts)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|