Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToC position bug when js is disabled #91

Closed
wants to merge 1 commit into from
Closed

Conversation

deniak
Copy link
Member

@deniak deniak commented Mar 30, 2016

@bert-github noticed a small bug with the ToC position when javascript is disabled and body doesn't have the class toc-sidebar (eg. https://www.w3.org/TR/2016/WD-webmention-20160329/).
On small screens, the ToC overlaps the content instead of switching to the inline mode.
That MR should fix that bug.

@fantasai
Copy link
Contributor

fantasai commented Apr 1, 2016

I'm a bit confused. If JS is disabled, .toc-sidebar will never be applied. Therefore the rule you're deleting will never be applied. So why is there a problem? Is JavaScript turned off after the page load?

@deniak
Copy link
Member Author

deniak commented Apr 4, 2016

Some documents such as webmention have the class toc-sidebar applied directly in the markup. I suppose respec is adding it while generating the snapshot. So even if you have javascript disabled, the class is there.

@marcoscaceres
Copy link
Member

@deniak, I don't think it's ReSpec adding it... at least, I can't find that when I git grep "toc-sidebar".

@marcoscaceres
Copy link
Member

Looking at the editor's draft, it seems that the author of that document included it explicitly (class="h-entry toc-sidebar").

@deniak
Copy link
Member Author

deniak commented Apr 4, 2016

Ah good to know. Thanks @marcoscaceres.
So I think the CSS still need to take that case into consideration.

@deniak
Copy link
Member Author

deniak commented Apr 11, 2016

@fantasai what do you think about that PR?

@fantasai
Copy link
Contributor

The PR is wrong. It'll break forced sidebar ToCs on narrow screens, which is why that code exists in the first place. If the editor of that document is manually adding .toc-sidebar, then that editor needs to stop doing stupid things. PR rejected.

@fantasai fantasai closed this Apr 11, 2016
@deniak deniak deleted the js-disabled-bug branch April 11, 2016 17:48
@deniak
Copy link
Member Author

deniak commented Apr 11, 2016

Thanks for the review. I'll ask the editors to remove the class.

@deniak
Copy link
Member Author

deniak commented Apr 11, 2016

After a closer look, it was indeed a bug in respec (w3c/respec#644) that was fixed a month ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants