Skip to content

AssertionError with @-ms-viewport inside @media #17

Description

@hemebond

If you append the following code to tests/four.css

@media (max-width: 900px) {
  @-ms-viewport {
    width: 320px;
  }
}

it will cause an AssertionError exception to be raised. Seems the viewport selector gets replaced with a temp_key but the assertion for the @media selector doesn't know that.

Activity

  1. peterbe commented on Aug 23, 2013

    @peterbe
    Owner

    Sorry for late reply. Been busy.

    If you really need this you can attempt to write a unit test that demonstrates the bug.

  2. added a commit that references this issue on Aug 31, 2014
  3. jithurjacob commented on Dec 23, 2015

    @jithurjacob

    TROUBLEMAKER
    u'a[href^="javascript'
    TROUBLEMAKER
    u'a[href^="javascript'
    Traceback (most recent call last):
    File "test.py", line 38, in
    run()
    File "test.py", line 12, in run
    p.process(URL)
    File "C:\Python\lib\site-packages\mincss\processor.py", line 144, in process
    processed = self._process_content(content, self._bodies)
    File "C:\Python\lib\site-packages\mincss\processor.py", line 372, in _process_content
    assert old in content, old
    AssertionError: @media (min-width: 768px) {
    .cx {
    font-size: 21px;
    }
    }

  4. peterbe commented on Jan 12, 2016

    @peterbe
    Owner

    I have to be honest. I'm struggling to find time to work on this. Would you like to attempt it yourself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions