What is "no-js" class?
Permalink
I saw "no-js" class added to <html> tag in the edit mode. There is no stylesheet attached to this class. Is it there to identify the page I am in is in the edit mode?
Is there another way (or better way) to identify the page is in the edit mode? I want to hide some elements in the edit mode using CSS.
<html class="no-js" lang="en" style="cursor: auto ! important;">
Is there another way (or better way) to identify the page is in the edit mode? I want to hide some elements in the edit mode using CSS.
In terms of concrete5, it's NOT a way to tell if the page is in edit mode.
There is a concrete5 function to test if you are in edit mode, and you can use that to add in an extra class. The following is an example of what you could do to your body tag in your template:
I often will make this a bit more useful, by putting in the page type handle in there as well: