• S|i(3_x (unregistered)

    Herb Morrison cried: Oh, the humanity! [image] and the Skipper said: Dip! [image] and Shaggy said: Zoinks! [image] and McBain lamented: My eyes! The goggles do nothing! [image] and the kid from Home Alone screamed: AAAAAAaaaaaghhhh!!! [image] and Skwisgard winced: This thing squish my ball. I might throw up... [image]

  • (cs) in reply to otto
    otto:
    regarding the tdWhiteBdr and tdBlackBdr classes...

    aside from the fact that they could have just done the four border styles in one line why exactly is css "not intented to be used" this way? is it just that they don't lock it into the "td" element?

    There is little point in specifying the style you're applying to a class in the class name itself. What happens when someone wants to change it so the borders are blue? Do you search and replace all the tdBlackBdr classes with tdBlueBdr, or leave them alone and thus incorrect? And how does the next developer know where he should use the tdBlackBdr class as opposed to the tdWhiteBdr one?

    A much better practice would be to call the classes something more meaningful and open to future changes, such as accentedTableCell or newContent. This is similar to the reasons why it's now recommended to use HTML elements like and instead of and .

  • Porpus (unregistered) in reply to Zylon
    Zylon:
    Porpus:
    To me, CSS seems to have one huge flaw. I do not understand why the styles are applied hierarchically. If I apply a green, 1px solid border to something, very rarely do I want that setting to "cascade" to that control's child controls.
    And that's why people competent in CSS use the "class" attribute.

    How does using the "class" element correct the problem I noted? Sure, if I set "class" correctly for every element, then each element will (theoretically) look right. But that doesn't change the fact that if I don't specify "class" for an element, it (illogically) inherits its style from its containers (or its container's container... and so on ad nauseam).

    Typically when I am using CSS, I spend a lot of time trying to figure out things like "why is that particular label hot pink?" I guess I could address this by explicitly setting "class" for every frickin' element, but to me that's overkill.

    Have I misunderstood?

    captcha="bling"

  • Wilhelm (unregistered) in reply to Porpus

    Porpus, First of all, I strongly reccomend that if you do any css debugging you check out Firebug not only will it show you what styles you have applied to an element but what line in which file that style is from. Makes understanding exactly how you got that green border much easier.

    I spent a while trying to come up with a way to put it that HTML or more specifically XHTML already has this hierarchical structure. You really do want things to "cascade" otherwise you would have to go through and set a class on everything. Think about manually setting the font size of every paragraph in your application instead of specifying that in the containing tag.

  • (cs) in reply to Chris M
    Chris M:
    I use the s = s + "..." ... some times in shell scripts when you need to build a path or whatever and when you might expect to need to change the order. And just for readibility, too.

    That way, even in vi or notepad it's a simple edit to reorder:

    set CLASSPATH = %CLASSPATH%;c:\apps\xerces\bin... set CLASSPATH = %CLASSPATH%;c:\apps\xalan... etc.

    But clearly this dude was deranged.

    I know it's off-topic, but if you're tired of building a classpath that way, you should consider putting a "Class-Path" line in the manifest of your jar file. See here for details (and as you can see from the URL, it's been a capability of standard Java for many years). ant's "jar" task even has nested elements that make specifying manifest lines easy.

    Then you have a jar that you can run with "java -jar myapp.jar" or even by double-clicking on the file. No CLASSPATH environment variable needed and no -classpath option needed.

  • (cs)

    This is so bad that I had to take a nap 10 lines into it to keep my brain from shutting down on its own.

  • (cs) in reply to Eli
    Eli:
    The thing is... I could see myself at one time thinking, "hey, wouldn't it be great if we could abstract away some of the CSS code. Maybe put the class names in a table."

    I'm pretty sure I'd have stopped long before it got this bad, though.

    It can be done, but it has to be done well or you end up with a WTF like this. Something like Perl's Template Toolkit can make doing it painless and caching can help keep performance, but it's rarely a useful construct unless you're building a CMSMS (a Content Management System Management System).

  • greyfade (unregistered)

    A credit card processing company (another division of my former employer) used a similar method for its stylesheets - except the "classes" were columns in an ever-widening table. This single table is used to "customize" hundreds of clients' credit card gateways (which were differentiated solely by URL - introducing another class of WTFs). But that's not all: this widely-used gateway system runs on Witango on a couple of very old Windows 2000 servers. (Whitebox PentiumII-300s.)

    Witango itself is a whole new level of WTFery, and I really wish I could adequately describe it. I never personally worked for that part of the company, but I did get to see some of what went on. I used to think ColdFusion was a WTF language. Witango redefined my whole concept of WTFery.

    captcha: smile

  • Jon (unregistered) in reply to Jim Flood
    Jim Flood:
    Whoever wrote this code is a <strong_language>Fucking</strong_language> Moron
    Shouldn't that be Fucking?
  • Matthew (unregistered)

    I like the way all this code which a human should never actually see is terminated with vbcrlf and, if inside a {}, indented.

  • Adam (unregistered)

    ...At least he indented correctly? ;)

    CAPTCHA: Atari, the quality of who's games is far superior to this.

  • (cs) in reply to Say What?
    Say What?:
    Let's see, that's:

    approx 100 string concatenations outside the main loop approx 10 string concatenations inside the main loop * numRows approx 8 string concatenations inside the inner loop * numFields in what should be a join

    for a grand total of waaay-too-many!

    barfs

    probably what the server did after a few hits on this little gem

  • Ørjan Langbakk (unregistered) in reply to Porpus
    Porpus:
    How does using the "class" element correct the problem I noted? Sure, if I set "class" correctly for every element, then each element will (theoretically) look right. But that doesn't change the fact that if I don't specify "class" for an element, it (illogically) inherits its style from its containers (or its container's container... and so on ad nauseam).

    Typically when I am using CSS, I spend a lot of time trying to figure out things like "why is that particular label hot pink?" I guess I could address this by explicitly setting "class" for every frickin' element, but to me that's overkill.

    Have I misunderstood?

    If you spend a lot of time figuring out stuff like this, you do it wrong.

    You set the originating look for the HTML-tag in the CSS, and you differentiate with classes put on the different tags if you want to have, say, a "<label>"-tag that's different from other "<label>"-tags.

    Say you want to make your ordinary HTML "

    "-tag look like 12px Arial - you'd write it like this:

    p { font-family: Arial; font-size: 12px; }

    and then you'd want a particular type of paragraph to look like 12px Arial with a red dotted 1px border, you'd add this class:

    .warning { border: 1px dotted #f00; }

    and then you could just add the the class to the "

    " you wanted to change, like this:

    No cascading, the class will be ended when you end the paragraph, and all the other "

    "-tags will look like the "normal" CSS-style.

    I don't really see the problem?

  • The developer (unregistered)

    I'd like to give all of you a bit of information on the project and how this code came to be.

    First of all, the REQUIREMENTS of the project are summed up as follows

    1: The CLIENT would receive an Administrative tool that would allow them to A) Easily maintain ALL Content B) Be able to apply stylesheet elements to the editable content C) Be able to maintain the stylesheet elements D) Maintain the menu structure and categories E) ALL information to be stored in a database F) MOST IMPORTANTLY - the CLIENT and their STAFF did NOT want to learn html coding. The admin tool should be a point/click/type WYSIWYG editor.

    2: The only thing the client did not want control over was the template of the site.

    Now, if the stylesheet was created and stored as an actual file on the webserver, transferred to the client pc to edit and transferred back to the web - you could end up with the possiblities of other users overwriting another's changes which would NOT be a good thing. This way - all in a database, you pretty much eliminate that issue. Plus, you'd have to require the person editing to constantly refer back to the CSS file for the classes when editing the content. With the editor I built, all they have to do is highlight the text and select the class and it's done. SIMPLE for the end user.

    the items that are specified in the code that were not pulled from the database are elements that would affect the template of the site and so I did not want the client to be changing those items or worse, deleting those items.

    For the poster that asked what the rs("ISClass") was for - Regular elements such the ones for links,forms,body, etc... are written to the css differently than classes. Regular elements such as Body, Links, table cells are written similary to BODY { ..... }
    A { .... }

    Classes are written as .ClassName { ...... } Thus the reason for the true/false for the type of entry.

    For the poster that asked about ending each line with a VBCRLF - if you didn't and you looked at the source html it would be mess to read through. With the carriage return/line feed, the resulting output string is easier to read if need be.

    Since the CSS was to be applied to each page, rather than making the calls to the database on each time a page is loaded, I did it one time and stored it in a session variable.

    Did I want to do the CSS this way, not really but DUE TO THE REQUIREMENTS of the project, it was necessary. Do you either Follow the requirements, satisfy your client and get paid or screw the requirements and risk doing all the work and not getting paid?

    Also, the submitter of the code did not inherit it, he's not even responsible for maintaining it. The original developer (ME) is still in control of it. Oh By the way - my client that uses my Content Editor says it's the best editor they have used so far. It provided them the most control over their data than they've ever had with other admin tools. Plus it was so easy to use.

  • NickF (unregistered) in reply to otto
    otto:
    regarding the tdWhiteBdr and tdBlackBdr classes...

    aside from the fact that they could have just done the four border styles in one line why exactly is css "not intented to be used" this way? is it just that they don't lock it into the "td" element?

    the whole point of CSS is that when writing your content, you shouldn't have to actually think about the design or visuals of it at all. You should semantically mark up your code to same what it actually represents, rather than how you want it to look in a browser.

    By marking up a table cell with a class of "tdWhiteBdr", you add absolutely no meaning to it, and are mixing your content with your design again.

    What you'd want to see there is it marked up as something like ....

    To me, CSS seems to have one huge flaw. I do not understand why the styles are applied hierarchically. If I apply a green, 1px solid border to something, very rarely do I want that setting to "cascade" to that control's child controls.

    I like the ASP.NET 2.0 "themes" system, which allows one to apply named styles to server-side controls without causing any "cascading." I wish client-side styles were more like that.

    I don't think you really understand or have used CSS very much. If you do:

    body {
      border: 1px solid green;
    }

    it's not going to make every single child element of <body> have a green border.

  • Mr Steve (unregistered)

    #$%#$VKJjv#V

    glehvl34u53o53%V#v5 fcc35

    2V%Q$C#$%CKH#%JC!C

    !!!!!!!!!!!!

    My first desk job working for the govt i used to make VBA apps that had no relevance to my job cos my job was boring and i was learning to code. The coding i used to do was hoooorible, but nowhere near this bad. That is honestly the worst code I have ever seen.

  • Mike5 (unregistered)

    Wow!!! Just... WOW!!!! This style sheet is so... dynamic.

  • UniMatrix69 (unregistered) in reply to The developer

    You could have written more efficient code in a number of very simple ways: 1: Use a stringbuilder and append the values to it, finally setting the session variable to the toString result of the stringbuilder. This is orders of magnitude faster than your method 2: You could have built up the customised CSS fragment entirey in a stored procedure using a table variable (or temporary table) and appropriate fast forward readonly cursors and/or joins, returning a recordset that contains only one column per row, to the .Net app, and then looping through the datareader to append the column values to a stringbuilder, which is then toString added to the session variable

  • Chris (unregistered)

    My Firefox dictionary is inexplicably missing the word "movie".

  • nco (unregistered)

    ( in C++ it is not wise to inherit from a base class which does not have its destructor virtual, as I believe std::string hasn't )

  • awt (unregistered) in reply to The developer
    The developer:

    (....snip....)

    For the poster that asked what the rs("ISClass") was for - Regular elements such the ones for links,forms,body, etc... are written to the css differently than classes. Regular elements such as Body, Links, table cells are written similary to BODY { ..... }
    A { .... }

    Classes are written as .ClassName { ...... } Thus the reason for the true/false for the type of entry.

    Yes, I guessed that. My point was, why is the table called tblCssClasses rather than, say, tblStyles or tblCssSelectors?

    (And don't get me started on the insanity of naming all your tables tblSomething...)

  • (cs) in reply to awt
    awt:
    The developer:

    (....snip....)

    For the poster that asked what the rs("ISClass") was for - Regular elements such the ones for links,forms,body, etc... are written to the css differently than classes. Regular elements such as Body, Links, table cells are written similary to BODY { ..... }
    A { .... }

    Classes are written as .ClassName { ...... } Thus the reason for the true/false for the type of entry.

    Yes, I guessed that. My point was, why is the table called tblCssClasses rather than, say, tblStyles or tblCssSelectors?

    (And don't get me started on the insanity of naming all your tables tblSomething...)

    What about naming your classes "Class<something>"? And enums "Enum<something>"? It's part of the guideline where I work.

  • Your Competitor (unregistered)

    Nice work. I like it!! Now, all I have to do is to get you hired by my competitor. That is a win-win for all concerned. Especially me =)

  • awt (unregistered) in reply to joaomc
    joaomc:
    awt:
    The developer:

    (....snip....)

    For the poster that asked what the rs("ISClass") was for - Regular elements such the ones for links,forms,body, etc... are written to the css differently than classes. Regular elements such as Body, Links, table cells are written similary to BODY { ..... }
    A { .... }

    Classes are written as .ClassName { ...... } Thus the reason for the true/false for the type of entry.

    Yes, I guessed that. My point was, why is the table called tblCssClasses rather than, say, tblStyles or tblCssSelectors?

    (And don't get me started on the insanity of naming all your tables tblSomething...)

    What about naming your classes "Class<something>"? And enums "Enum<something>"? It's part of the guideline where I work.

    Why stop there? :

    http://www.example.com/dirSomething/webpageWhatever.extHtml

  • Dave (unregistered) in reply to The developer
    The developer:
    ... Now, if the stylesheet was created and stored as an actual file on the webserver, transferred to the client pc to edit and transferred back to the web - you could end up with the possiblities of other users overwriting another's changes which would NOT be a good thing. ...
    obviously you've never heard about locking a file?
    ... the items that are specified in the code that were not pulled from the database are elements that would affect the template of the site and so I did not want the client to be changing those items or worse, deleting those items. ...
    just use 2 css files, one that's editable and one that's not, and include both...
    Did I want to do the CSS this way, not really but DUE TO THE REQUIREMENTS of the project, it was necessary.
    even strange requirements are no excuse to write shitty code. and, after all, a wysiwyg html editor with some css support is not so far fetched...

    captcha: ewww... really.

  • Zygo (unregistered) in reply to nco
    nco:
    ( in C++ it is not wise to inherit from a base class which does not have its destructor virtual, as I believe std::string hasn't )

    Virtual destructors are required when you are deleting an object of a derived class through a base class's pointer. AFAIK this is the only time they are required. If the class has no other virtual methods then it is quite expensive to add one just for a destructor that doesn't need to be virtual.

    It's perfectly fine as long as you never delete an object of the derived class using a pointer to the base class. This means either a) C++ deletes the derived class object because it has static or automatic storage duration, or b) you delete only through the pointer-to-derived, which calls the correct destructor without needing to do virtual method lookup (or c) you leak the object, because you avoid the problem by never deleting the object).

    The behavior of "delete (Base *)derived" where Base::~Base() is non-virtual is actually undefined (5.3.5.3), so you really don't want to be doing that even if it does work most of the time on many compilers.

    One specific case where a virtual destructor isn't required is where an object provides an abstract virtual method that deletes itself (MS seems to like doing this). In this case the most-derived class's method does "delete this", but since this points to an object of the most-derived type, no virtual delete method is required. Usually you want to make the destructor on the base class protected in this case.

  • Porpus (unregistered) in reply to NickF
    NickF:
    I don't think you really understand or have used CSS very much. If you do:
    body {
      border: 1px solid green;
    }
    it's not going to make every single child element of <body> have a green border.

    You're right on both counts... that particular border setting does not cascade, and I have not used CSS that much (having quickly tired of it). I can't deny that!

    BUT: certain settings do cascade... for instance, consider the following HTML (no, it's not XHTML compliant, sorry)

    <html>
     <head>
      <style type="text/css">
       body.pinky 
       {
        border: 5px solid pink;
        color:pink;
       }
       div.bluey
       {
        border: 5px solid blue;
        color:blue;
       }
      </style>
     </head>
     <body class="pinky">
      
    Weird Al Jankovic
    </body> </html>

    As coded above, everything works logically; the body is surrounded by a pink border, and the text is blue and its div surrounded by a blue border.

    The problem (as I see it) happens if I remove the "class" attribute ("bluey") from the declaration of the div. Then certain aspects of "pinky" (e.g. color) cascade down to the div, but other aspects do not (e.g. border).

    As you note, I am (unashamedly) ignorant of CSS, so I don't understand what cascades, what does not, or why. And as a result, I constantly find myself asking questions like "why is that text in italics?" or "where in the hell did that ugly green border come from?"

    All of this can be solved by not using CSS. As a result, I tend to use the "style" attribute individually on each element, as opposed to "class" attribute. Granted, this denies me the much-touted ability to change some visual aspect of the UI of the whole site in one fell swoop. Honestly, I've never really missed that capability when it was absent, and I never really saw it work on pages that used the "class" attribute.

    Captcha="digdug"; I bet the poor slobs who wrote DigDug didn't have to worry about architectural paradigms or buzzwords!

  • Jon (unregistered) in reply to Porpus
    Porpus:
    The problem (as I see it) happens if I remove the "class" attribute ("bluey") from the declaration of the div. Then certain aspects of "pinky" (e.g. color) cascade down to the div, but other aspects do not (e.g. border).

    As you note, I am (unashamedly) ignorant of CSS, so I don't understand what cascades, what does not, or why.

    As a result, I tend to use the "style" attribute individually on each element, as opposed to "class" attribute.

    Is this a troll post? It's quite clever.

  • Jon (unregistered)

    Hey.. Hey.. Paula.. I want to marry you... Paula wrote this didn't she?

  • The developer (unregistered)

    I should also add that the code has been cleaned up since it was first written. The items that were not to be modified have been put into their own css file.

    the code that builds the styles from the database had also been cleaned up and coded better.

  • Foobar (unregistered)

    Oh me, oh my, oh.. mamma!

  • Drak (unregistered)

    @Porpus: Not sure what browser you use but:

    <HTML> <HEAD> </HEAD> <BODY style="color:blue">
    This is also blue
    </BODY> </HTML>

    Using the style attribute is does exactly the same, the color in the DIV is blue, because I did not tell the browser to change colors.

  • jiggy (unregistered)

    I once had to support a perl-based web app that put the entire CSS into a hash and that rather than <tag class="classname"> it had <tag> all over the place. We had some screens that had tables that were hundreds of rows and it produced page weights around 1MB without images.

  • Joe (unregistered) in reply to OneMHz

    Exactly what I was thinking ha

  • MyName (unregistered) in reply to MaGnA
    MaGnA:
    Just saw this:

    trim(rsCSSDetail("PropertyName") & " ")

    WTF!?!?! Append a space and then trim it?

    In VBScript, this was a common (from my experience) way to protect against errors due to rsCSSDetail("PropertyName") evaluating to Nothing or null (or whatever you'd like to call it). In other words, by concatenating a space to the end of a null value, it wouldn't be null anymore and they could use it without checking for nulls in a "more correct" manner.

    CAPTCHA: xevious (indeed)

  • David Anderson (unregistered)

    No. I refuse to believe.

  • BillyBob (unregistered) in reply to Diego
    Diego:
    Cyrus:
    Diego:
    Kemp:

    No syntax error if we assume C++ and

    class Comment : public std::string {};

    C++ does not inherit constructors. Comment's constructor does not take parameters. Comment c = ""; will not compile

    read Stroustroup book before trying to be funny with C++

    muhahaha :)

    Yes, but if we assume a custom class that does not inherit from string then a constructor:

    Comment(const char *String)

    will compile this code just fine.

    too late! he made an empty class. we can see it clearly!

    I didn't think it was a complete segment of code myself.

    Still a bad idea to inherit things from the standard library however (std::string [well, std::basic_string] doesn't have a virtual destructor for starters)...

    Could be a custom class or simply a typedef:

    typedef std::string Comment;

  • Cloak (unregistered) in reply to MaGnA

    trim(rsCSSDetail("PropertyName") & " ")

    WTF!?!?! Append a space and then trim it?

    It's a fast way to handle NULLs in VB6/ADO. Since rsCSSDetail("PropertyName") is a Variant concatenation with a string will initialize it to a string. Still better than to write:

    If IsNull(rsCSSDetail("PropertyName")) Then rsCSSDetail("PropertyName") = "" End If

  • Tarwn (unregistered)

    For the original developer, who didn't leave a name or anything small enough to quote:

    1. Recordset.GetString() and stop concatenating back to the Session variable, VBScript doesn't handle concatenation well, especially not into the COM object that is the Session collection

    2. Better yet, when you save changes to your Database, generate a new static css file and overwrite the old one. You could even use most of the same code (and a FileSystemObject). This way you only have to generate the CSS content once, putting the wait n the administrator, instead of every time a visitor loads the page. Better yet, push the content to a temp file, then move (overwrite) the temp file on your CSS file to rule out someone getting an empty CSS file mid-write.

    Whee...

  • Mexi-Fry (unregistered) in reply to Diego

    class Comment { public static operator ==(string s) { //... } }

  • Mexi-Fry (unregistered) in reply to Mexi-Fry
    Mexi-Fry:
    class Comment { public static operator ==(string s) { //... } }

    // OOPS... C++ rusty... too much c# (char* c) he he e

  • Mexi-Fry (unregistered)

    Sounds like a good idea. Think my boss would mind if I generated my html from the database and stored that in the session too? I could even multi-thread it. Maintainence would be a staff of 20 just to bold a line of text on some random page.

  • mexi-fry (unregistered)

    Atleast he disposed of his recordset. Gotta save room in memory so the same document can be loaded into memory once per user.

  • (cs)

    The one single redeeming bit is that it uses "doubled""quotes" instead of "doubled" & Chr(34) & "quotes"

    Otherwise I'd be absolutely certain it was made by the same person I inherited a particularly a bad management and reporting program from. The simple act of changing the generation from one concatenation per line to combining big blocks at a time halved the runtime; making it template driven sped it up even more.

  • (cs)
    Also, the submitter of the code did not inherit it, he's not even responsible for maintaining it. The original developer (ME) is still in control of it.

    HA HA!!! The submitter knew enough to know you did everything wrong. You somehow read this site on a regular basis and still pulled this crap and THEN showed up to defend it? As was pointed out already by others, poor understanding of string concatenation, session variables, static file usage, and CSS.

  • (cs) in reply to Porpus
    Porpus:
    The problem (as I see it) happens if I remove the "class" attribute ("bluey") from the declaration of the div. Then certain aspects of "pinky" (e.g. color) cascade down to the div, but other aspects do not (e.g. border).

    As you note, I am (unashamedly) ignorant of CSS, so I don't understand what cascades, what does not, or why. And as a result, I constantly find myself asking questions like "why is that text in italics?"

    Why don't you want this?

    abcdefghijklmno

    Do you ask why "fghij" is italic? (and, incidentally, you are describing inheritance, not cascading. cascading is how it tells which of several declarations (say, one for the tag name, one for the class, one for the id, or more complex stuff) is most important to apply its styles to an element. Inheritance is when some of the aspects of an element are retained in child elements. In general, styles that affect the text will inherit (since the child element's text is part of the same run of text between the parent element's open and close tag), styles that will affect the box the text is in will not (since it's a different box) - note that background colors do not inherit by default, they are transparent by default.

  • Igor (unregistered) in reply to Porpus
    Porpus:
    How does using the "class" element correct the problem I noted? Sure, if I set "class" correctly for every element, then each element will (theoretically) look right. But that doesn't change the fact that if I don't specify "class" for an element, it (illogically) inherits its style from its containers (or its container's container... and so on ad nauseam).

    You should not end up setting class for every single element but just for minority of them. If you have to use class for everything then you are working against the system and you need to change your mindset.

    Porpus:
    Have I misunderstood?

    Seems like you did. It is logical for elements to inherit styles. For example, if I want the whole website to use the same font, I should not have to specify it for all the elements but just for the top-level one.

    You need to work top down with CSS. Start with defining top-level styles and then descend. That way you will immediately notice if you try to apply conflicting styles to the elements.

  • Porpus (unregistered) in reply to Random832
    Random832:
    Why don't you want this?

    abcdefghijklmno

    Do you ask why "fghij" is italic? (and, incidentally, you are describing inheritance, not cascading. cascading is how it tells which of several declarations (say, one for the tag name, one for the class, one for the id, or more complex stuff) is most important to apply its styles to an element. Inheritance is when some of the aspects of an element are retained in child elements. In general, styles that affect the text will inherit (since the child element's text is part of the same run of text between the parent element's open and close tag), styles that will affect the box the text is in will not (since it's a different box) - note that background colors do not inherit by default, they are transparent by default.

    I neither need nor want to understand what inherits, nor do I care to know the rationale of the people who designed CSS. It's just way too much information than I care to learn in order to handle this really unimportant cosmetic stuff.

    I said before that I don't understand the argument that portrays CSS and "Table-Based Design" as opposites or as competing ways to do the same thing. BUT I will say that

    , seem to me to operate according to a few easily mastered rules, whereas CSS does not. CSS seems to operate based on a bunch of rules formed by a commitee with a very specific idea of what they think I am doing with HTML. Like so many bad standards, it suffers from narcissism on the part of its creators, who think things like "well, of course designers will want text attributes to inherit [for whatever reasons they had] and of course they won't want border style to inherit [presumably because the ugliness that would result]." Frankly, the designers of CSS don't know what the hell I'm doing with HTML, and they overstep their bounds by making presumptions about how I use it.

    captcha=burned [one too many times by CSS to ever voluntarily use it again] OR

    captach=burned [out on having to learn a long list of rules to make my text, say, italic red]

    , and
  • (cs) in reply to Porpus

    If text attributes did NOT inherit, the code abcdefghijkl would look like abcdefghijkl - if you don't want rules from multiple elements to apply to your text, don't nest tags (at least, not ones with those attributes) inside each other - if you ACTUALLY want abcdefghijkl, use abcdefghijkl. if you want two divs with the text of the outer one green and the text of the inner one not, use

    text
    inner div
    text
    instead of defining the green style on the outer div.

  • azo (unregistered)

    OMG. Are we allowed to do this? I lost plenty of neuron by just reading it and now I need to find a way to replenish back.

Leave a comment on “Overflowing Style Sheets”

Log In or post as a guest

Replying to comment #:

« Return to Article