css not obeying to changing :target selector

RESOLVED DUPLICATE of bug 1145010

Status

RESOLVED DUPLICATE of bug 1145010
4 years ago
7 months ago

People

(Reporter: public, Unassigned)

Tracking

38 Branch

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Build ID: 20150505103531

Steps to reproduce:

- navigate to www.internetseiten-vom-fachbetrieb.de
- resize viewport to match css media queries for mobile devices
- click the button in the header (to the left of "Internetseiten vom Fachbetrieb")
- now click the "X"-button in the navigation to close it


Actual results:

the "X" in the navigation removes the "#top" from the url but the navigation bar did not close like it did in 37 Branch.


Expected results:

navigation should be closed by removing #top:target rule and resetting the "width"-attribute of "#nav .ym-hlist" to 0.

Comment 1

4 years ago
Could you attach a minimal testcase, please.
Flags: needinfo?(public)
(Reporter)

Comment 2

4 years ago
Try it with the following code:

8<----------------------------------8<

<html>
<head>
    <meta charset="utf-8">
    <title>test case</title>
    <style>
        #top:target .content {
            background: #ff0000;
        }
    </style>
</head>
<body id="top">
    <a href="#top"><button>set color</button></a>
    <a href="#"><button>clear color</button></a>
    <div class="content">
        <p>This is some content.</p>
        <p>Bliblablu blubeldiblub blabla.</p>
    </div>
</body>
</html>

8<----------------------------------8<

The "clear color" button should remove the red background from ".content". At least it did with Firefox prior to branch 38.
Flags: needinfo?(public)

Comment 3

4 years ago
Created attachment 8605422 [details]
1164349.html (reporter's testcase)

Comment 4

4 years ago
WFM with FF38, the button removes the red background.
(Reporter)

Comment 5

4 years ago
Tested again and got some further information: Had the web development panel open to simulate different viewport sizes and if I close the development panel it also WFM.

Comment 6

4 years ago
I guess you speak about the Responsive Design tool.

Updated

4 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 4 years ago
Component: Untriaged → Developer Tools: Responsive Mode
Resolution: --- → DUPLICATE
Duplicate of bug: 1145010

Updated

7 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.