Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Add class="no-js" to HTML tag in admin side
It would be really helpful to have class="no-js"
added to the <html>
tag on the admin side pages. It could then give admin theme authors the option of harnessing modernizr in their themes if they wish. Also a good precursor to the admin side eventually moving to html5.
Offline
Re: Add class="no-js" to HTML tag in admin side
Example of code here – as you can see it’s a pretty trivial change but could be a huge benefit to admin themers.
Offline
Re: Add class="no-js" to HTML tag in admin side
Phil, please enlighten me ;)
From my (limited) understanding of Modernizr, it will replace all instances of no-js
with js
on JavaScript-enabled browsers.
That’s nice for public-facing websites, but the Textpattern admin side won’t work on browsers without JS anyhow, making the presence of JS a safe assumption.
So why wouldn’t we just add a js
class to <body>
in the first place?
Offline
Re: Add class="no-js" to HTML tag in admin side
wet wrote:
…the Textpattern admin side won’t work on browsers without JS anyhow, making the presence of JS a safe assumption.
Ah, OK. If JavaScript is a requirement this change is not needed then. I’ve also checked whether the class=“no-js” is needed as a placeholder for the other tests (such as .no-svg, .no-rgba) to be filled into, and it isn’t, so that’s good. I can now safely bundle Modernizr with my next theme I’m building.
Offline