Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
Add "width=device-width" to meta viewport tag via aurora_preprocess_html().
function aurora_preprocess_html(&$vars) {
// Viewport!
$viewport = array(
'#tag' => 'meta',
'#attributes' => array(
'name' => 'viewport',
'content' => 'width=device-width, initial-scale=1.0',
),
);
Comment | File | Size | Author |
---|---|---|---|
#1 | add_width_directive_to-2284531-1.patch | 414 bytes | rabellamy |
Comments
Comment #1
rabellamy CreditAttribution: rabellamy commentedComment #2
iamcarrico CreditAttribution: iamcarrico commentedCommitted.
Comment #4
Snugug CreditAttribution: Snugug commentedFor a bit of background on this, it was initially removed as
initial-scale=1.0
will produce the ideal viewport in every browser except IE10 and at the time IE only supported the@viewport
directive. Since then, ppk has done research and determined that having both is needed to cover all browsers.