Welcome Guest, Not a member yet? Register   Sign In
inline css
#1

Hi Guys,

What do you think of inline css, is it a terrible idea. Do you create classes on the fly, do you organise your css files so they nicely follow a flow and read logically.

At the moment I kinda just add my css styles ad hoc. I know this is not good practice. So how do go about doing this?

Do you plan the css first from the onset?
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
Reply
#2

My front-end focused mate was saying something about new trend where CSS is broken into two - above the fold required stuff and rest. If above the fold was less than 60Kb I think, he said the best practice was to load it as part of HTML.

As for element based inline styling, it's not necessarily bad in all cases, but most of the time you might be better off using CSS classes or utility classes, and somehow make it easily customisable, so you can easily and quickly reuse same definitions.
Reply
#3

(09-12-2018, 12:20 PM)Pertti Wrote: My front-end focused mate was saying something about new trend where CSS is broken into two - above the fold required stuff and rest. If above the fold was less than 60Kb I think, he said the best practice was to load it as part of HTML.

As for element based inline styling, it's not necessarily bad in all cases, but most of the time you might be better off using CSS classes or utility classes, and somehow make it easily customisable, so you can easily and quickly reuse same definitions.

Yes I think you're right, admittedly I've always been lacking when it comes to proper html and css practices so this is something I want to approve upon.
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
Reply
#4

(This post was last modified: 09-12-2018, 07:22 PM by InsiteFX.)

I find it best to to create css files that pertain to what they are for.

footer
page
content
etc;

Then merge them together all into one file for faster loading, this way you
can modify just the one that you need.

Inline css is best used for email templates.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

@ignitedcms,

I'm not a fan of inline css (although there are exceptions). I'm a fan of the suggestion that InsiteFX made.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB