For Fuck's Sake_blue



  • @This was written YESTERDAY! said:


    <style type="text/css">
    .ui-widget_blue
    {
    color: black;
    }
    </style>


    Happy fucking Friday.


  •  From my teenage experiments with ink and color separation, "blue" is actually just light black.



  • And this is why you don't do names with color in them.  You names for what kind of thingy is going to be using it.



  • @locallunatic said:

    And this is why you don't do names with color in them.  You names for what kind of thingy is going to be using it.

    What if the kind of thingy is a blueprint, a glass of burgundy, a village green, or an orange?



  • @locallunatic said:

    And this is why you don't do names with color in them.
     

    The worst part is that that color of .ui-widget is already themed by jQuery UI. If he really, really, REALLY wanted to override it, I'd be less frothing at:

    .ui-widget.blue
    {
      color: blue;
    }

    Or even if all widgets in the parent needed to be rethemed

    .blue_wrapper .ui-widget
    {
       color:blue;
    }

     Or even just got to Themeroller and spat out a new UI Theme were ui-widget was blue.

    Then again the same page contains:

    Items = SQL.Fill("select * FROM long complex sql query")

    Items_count = SQL.Fill(" SELECT count(*) FROM long complex sql query")



  •  Ah, the classic "Fuck it, I'm just here to collect my paycheck" type of artisan.



  • Maybe the widget was sad and it decided to put on its Gothwear.



  •  Back during the Carter administration I wrote a report-writing subsystem for some accountants where I used colors to keep the various entities easy to refer to.  Couldn't call things "rows" or "pages" because the beancounters liked to put out alternate-universe reports where the things that would normally head columns (periods of time, or branches/subsidiary companies) became page differentia, and vice versa.  So the massively interlinked structure to be filled in from the general ledger had "red" nodes and "blue" nodes and "yellow" nodes, which were then translated to physical placement in the final step before printing.

    The accountants loved it so much that when the company bought an off-the-shelf GL package for bookkeeping, they used my report-writer instead of the one that came with the commercial software (and if the company hadn't been acquired by a bigger company many years after I left they might still be using my report-writer today).



  • @Lorne Kates said:

    Happy fucking Friday.
    How do you know how I spend my Fridays? Are you stalking me?

    @da Doctah said:

    "red" nodes and "blue" nodes
    I think there's a poem somewhere in there.



  • @locallunatic said:

    And this is why you don't do names with color in them.  You names for what kind of thingy is going to be using it.

    Is this the web-designer's version of Systems vs. Apps Hungarian?



  • @PJH said:

    @locallunatic said:

    And this is why you don't do names with color in them.  You names for what kind of thingy is going to be using it.

    Is this the web-designer's version of Systems vs. Apps Hungarian?

    Basically. If you're going to call something "blue", just hard-code it right in the damn HTML, like so: <span style="color:blue;"> The whole point of using classes is to abstract away the bits of styling into external style sheets, which can then be swapped out or easily changed in a central place. So class names shouldn't contain information about the styles du jour, but rather be descriptive of the purpose of the styles.



  • We kicked a guy that did this sort of stuff

    i.e. All our call to action buttons are green. So according to our code conventions you would name it what it is 

    .btn_cta

    But no he did

    .green

    So I had to reject a load of changes on code review and I think he went away and probably had a little cry.

    The thing that pisses me off is if you write you CSS this way it makes in ridiculously easy to maintain.

     



  • @locallunatic said:

    And this is why you don't do names with color in them.  You names for what kind of thingy is going to be using it.

    I had this fight with the web designers. I'd give my things class names like "wtf-btn-ok" and "wtf-btn-cancel" then they could style them how they like. (Note, not the literal "wtf" prefix but one used consistently everywhere). Deep in a CSS file there was a rule that floated ok to the left and cancel to the right, like Old Windows: it came down that they wanted to switch them, like Mac. I asked a designer to track those rules down and switch the floats. They couldn't understand why it didn't use the bootstrap "pull-right" / "pull-left" classes. (Because of this reason, der? and these are created in Javascript, an area you don't change and you have convenient classes to use in CSS) Well I lost the argument and the buttons gained some extra classes: They wanted to colourise them too, with "button-primary" etc.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.