Click here to Skip to main content
14,825,906 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: Splitting CSS? Pin
Sander Rossel26-May-18 10:13
professionalSander Rossel26-May-18 10:13 
PraiseRe: Splitting CSS? Pin
kmoorevs26-May-18 6:33
Memberkmoorevs26-May-18 6:33 
GeneralRe: Splitting CSS? Pin
dandy7226-May-18 7:15
Memberdandy7226-May-18 7:15 
GeneralRe: Splitting CSS? Pin
RandyBuchholz26-May-18 8:38
MemberRandyBuchholz26-May-18 8:38 
GeneralRe: Splitting CSS? Pin
dandy7226-May-18 9:40
Memberdandy7226-May-18 9:40 
GeneralRe: Splitting CSS? Pin
Chris Maunder26-May-18 7:47
cofounderChris Maunder26-May-18 7:47 
GeneralRe: Splitting CSS? Pin
RandyBuchholz26-May-18 8:51
MemberRandyBuchholz26-May-18 8:51 
GeneralRe: Splitting CSS? Pin
Chris Maunder26-May-18 10:26
cofounderChris Maunder26-May-18 10:26 
Nothing like consistency, right? Wink | ;)

For a personal answer to your question I would group your CSS semantically.

Define groups of user elements (containers, sidebars, banners, text areas, lists etc). I wouldn't use adjectives (big, small etc) so instead of bigBox I'd use "box". Your 'bigBox' may evolve one day into being smaller than other boxes.

You could then have a set of placement classes: "box side", "box main-content", "box callout".

Then a set of use-case classes: "box callout error"

Finally, you may wish to have style classes for theming, but never name the class based on their internal style. Instead of "lightblue" it could be "main-theme", or "sub-theme". This allows you to change your colours in one place and have the class names still make sense.

As a postscript there's the cheat classes we all use. "bold", "small" etc. We want the text to stand out boldly, and we can't think of a synonym for bold that won't be confusing, so we do class="label bold" instead of class="label" style="font-weight:bold">. Because we may want "bold" to mean "slightly bigger" or "with lasers flying out of it". I'm still waiting for W3C to ratify the text-decoration: lasers value. Still waiting...
cheers
Chris Maunder

GeneralRe: Splitting CSS? Pin
RandyBuchholz26-May-18 11:19
MemberRandyBuchholz26-May-18 11:19 
GeneralRe: Splitting CSS? Pin
jgakenhe26-May-18 8:07
professionaljgakenhe26-May-18 8:07 
GeneralRe: Splitting CSS? Pin
RandyBuchholz26-May-18 8:44
MemberRandyBuchholz26-May-18 8:44 
GeneralWhy does most C/C++ developer prefers char *c instead of char* c? Pin
.jpg26-May-18 2:20
Member.jpg26-May-18 2:20 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
User 1106097926-May-18 2:30
MemberUser 1106097926-May-18 2:30 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
Mike Hankey26-May-18 2:57
professionalMike Hankey26-May-18 2:57 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
lopatir26-May-18 3:12
Memberlopatir26-May-18 3:12 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
User 1106097926-May-18 3:22
MemberUser 1106097926-May-18 3:22 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
lopatir26-May-18 4:21
Memberlopatir26-May-18 4:21 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
User 1106097926-May-18 4:27
MemberUser 1106097926-May-18 4:27 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
Richard MacCutchan26-May-18 4:46
mveRichard MacCutchan26-May-18 4:46 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
User 1106097926-May-18 4:53
MemberUser 1106097926-May-18 4:53 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
Richard MacCutchan26-May-18 5:17
mveRichard MacCutchan26-May-18 5:17 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
User 1106097926-May-18 5:21
MemberUser 1106097926-May-18 5:21 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
Gerry Schmitz29-May-18 6:59
mveGerry Schmitz29-May-18 6:59 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
Ron Anders26-May-18 3:25
MemberRon Anders26-May-18 3:25 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
jschell26-May-18 6:33
Memberjschell26-May-18 6:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.