Previous Message
Next Message

media queries following prior rules

Sent by Tom Livingston on 12 July 2016 01:01


On Mon, Jul 11, 2016 at 7:58 PM, Philippe Wittenbergh [EMAIL-REMOVED]>
wrote:

>
> > On Jul 12, 2016, at 1:13 AM, John J [EMAIL-REMOVED]> wrote:
> >
> > At the link below, the name, email, subject fields don't appear to be
> > obeying rules governing width as in the previous media breaks..
> >
> > at 360 and 320, those fields exceed the width of  their parent, rather
> than
> > respecting padding set prior..maybe I'm missing something..if I have my
> > rules set up correctly, the css should behave a certain way until told
> > differently in the next media query, right?
> >
> > Thank you for any insight about this!
> >
> > John
> >
> > http://john-a-johnson.com/contact.php
>
> As suggested by Peter, the box-sizing rules are messing things up (big
> time).
>
> You have, on line 6 of style.css
> *, *:before, *:after { box-sizing: inherit; }
>
> That is a sledgehammer – and incredibly damaging – approach to a
> non-existent problem. Remove that rule and only override the default
> box-sizing in a case by case approach.
>
> Philippe
> --



While Philippe may well me right about Peter Gabriel singing the theme song
for this technique, I have used this method frequently, with a slight
difference. I use:

html{box-sizing: border-box;}
*, *:before, *:after { box-sizing: inherit; }

Possibly picked it up from here:
https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/

Though I can't put my finger on it right now, I have read where this method
isn't really as a performance hit as it may seem.

-- 

Tom Livingston | Senior Front End Developer | Media Logic |
ph: 518.456.3015x231 | fx: 518.456.4279 | medialogic.com


#663399
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: