Click here to Skip to main content
15,899,475 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
kmoorevs26-May-18 6:33 
GeneralRe: Splitting CSS? Pin
dandy7226-May-18 7:15
dandy7226-May-18 7:15 
GeneralRe: Splitting CSS? Pin
RandyBuchholz26-May-18 8:38
RandyBuchholz26-May-18 8:38 
GeneralRe: Splitting CSS? Pin
dandy7226-May-18 9:40
dandy7226-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
RandyBuchholz26-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
RandyBuchholz26-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
RandyBuchholz26-May-18 8:44 
GeneralWhy does most C/C++ developer prefers char *c instead of char* c? Pin
.jpg26-May-18 2:20
.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
User 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
mveMike 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
lopatir26-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
User 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
lopatir26-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
User 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
User 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
User 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
Ron 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
jschell26-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.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   465 votes