SitePoint Sponsor

User Tag List

Page 4 of 6 FirstFirst 123456 LastLast
Results 76 to 100 of 136
  1. #76
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pmw57 View Post
    Shouldn't that be "a div should only be used when isn't a semantically correct element type available"?
    Picky picky!
    That's what happens when fingers are faster than brain (which happens distressingly often to me).

    Quote Originally Posted by oddz View Post
    A header,footer, masthead,etc are all presentational.
    Masthead perhaps, but not header and footer.

    Quote Originally Posted by oddz View Post
    They relate to proximity and positioning.
    No they don't. Not necessarily. A header is something that comes at the head (beginning) of the document. A footer is something that comes at the foot (end) of the document. For obvious reasons they are usually rendered at the corresponding visual positions, but that's an aside, really. The names are structural: they identify the bits at the beginning and the end of the document, respectively.

    Quote Originally Posted by oddz View Post
    They have no bearing on the content itself unless your talking about where it is located on a page – presentation.
    They describe where in the logical, structural flow of the document those bits are. A header precedes the main content; a footer comes after the main content. They are not to be considered parts of the main content, but usually contain metainformation about the document, the site or the company or organisation that publishes the document.

    Quote Originally Posted by peach View Post
    Obviously thats not what I meant. The "etc." at the end of my sentence implied the list continues with more of similar structural blocks of a document.
    The identifiers in my sentence were not to be taken literraly, I just used them to give semantic () context to the words footer and header, implying that Im talking about HTML documents specifically.
    There is still no part in the HTML4 specification, as far as I know, that limits what you can use div elements for. They are the last resort when you need a block-level element and no other element type is semantically appropriate.
    Birnam wood is come to Dunsinane

  2. #77
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,194
    Mentioned
    17 Post(s)
    Tagged
    5 Thread(s)
    AutisticCuckoo wrote:
    No they don't. Not necessarily. A header is something that comes at the head (beginning) of the document. A footer is something that comes at the foot (end) of the document. For obvious reasons they are usually rendered at the corresponding visual positions, but that's an aside, really. The names are structural: they identify the bits at the beginning and the end of the document, respectively.
    Code:
    <div id="beginning">
    </div>
    <div id="end">
    </div>
    Then in theory this appropriate. However, in reality the beginning and end are implied so is there a need for those divisions anyway?

    logic_earth wrote
    According to your logic, we could not use the h1-h6 tags because they have a defined position. "Headers are to appear before there block of content" that has a set position.
    This is untrue because headings relate to hierarchy. A h1 tag could be placed anywhere and it still holds dominate importance regardless of its location.

  3. #78
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by oddz View Post
    This is untrue because headings relate to hierarchy. A h1 tag could be placed anywhere and it still holds dominate importance regardless of its location.
    No, it cannot be placed just any where. It would make no sense to place it under the content it is for. Nor could you place it under a child h2 or h*. It must be placed in a certain location to have a valid meaning.

    A header must proceed the content for which it is for. It must also proceed its children headers. Therefore it has a set position in its definition.

    You are confusing what you see on the monitor versus what the computer sees.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  4. #79
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,194
    Mentioned
    17 Post(s)
    Tagged
    5 Thread(s)
    The computer sees a h1. It knows that a h1 is a dominate element regardless of where it is at. It knows a h2 has a lower importance than the h1 wherever it might be. There isn't a rule stating a h1 tag needs to appear at the top.

    If a footer or header must appear at the top of the document than its tied to presentation. Masthead and Header don't describe the content they describe where the content is.

    Code:
    <div id="header">
      <p>name</p>
      <p>date</p>
    </div>
    header doesn't relate to the content it related to where the content is. Header doesn't convey anything about the content within besides for its location.

  5. #80
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    It feels nearly as bad to use header and footer as it is to use top and bottom. What though is a more structurally biased choice to use?

    Something like banner is too loaded, but nameplate could be used instead of header, and footer could instead be called masthead.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  6. #81
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,194
    Mentioned
    17 Post(s)
    Tagged
    5 Thread(s)
    pmw57 wrote:
    It feels nearly as bad to use header and footer as it is to use top and bottom. What though is a more structurally biased choice to use?
    I will still use masthead,content and footer like I have been. However, these conventions aren't without flaw and that is the point I've been trying to make. Therefore, we should always be questioning and exploring more appropriate solutions. Conventions are conventions because they work, not because they aren't without flaw, but than again I'd be hard pressed to find anything that isn't…

    The great thing about masthead,content,footer,etc is that they are generic. If you were to use more contextual naming conventions they would need to be specific to the content which would make them less flexible. You would need to reinvent the wheel every time a new site came along. You would also need to have a deep understanding of the content itself so that you id or class it as specific to the content within. Its just not practical.

    Furthermore, using different id or classes for the view of the page would make it ever so much more difficult to position items. You would essentially need to know those different id or class names and create selector groups. Again… not worth it.

    Therefore, its Utopian to believe that there can ever be a true separation of structure and presentation. Its just not practical with the technology and I don't think it ever will be.

    Some may think I'm contradicting myself, but what I practice doesn't change my belief. Its just more practical and the lesser of two evils. Ideal is great, but the ideal isn't always practical.

  7. #82
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think header, footer, wrapper can be replaced with a more 'semantic' naming convention and still be reused in every new 'site' built without reinventing the wheel.

    The article I posted earlier on states what 'names' will replace which, and an appropriate reasoning behind these.

    1. wrapper can be replaced with page-content.

    Page content might not be the best but, it conveys a more meaningful description than 'wrapper'.

    Oddz, you are bringing 'valid' points to this discussion, follow up on your ways

  8. #83
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,194
    Mentioned
    17 Post(s)
    Tagged
    5 Thread(s)
    I've always frowned upon the naming conventions associated with the main wrapper. The problem is that the main wrapper isn't actually the page practicality wise. The page is actually the content that changes for the given layout. I think a more semantic and generic naming convention that conveys this would be wise. However, the convention should also create a relationship between main "wrapper" and page "wrapper". perhaps:

    Code:
    <div id="main">
      <div id="header">
      </div>
      <div id="page">
      </div>
      <div id="footer">
      </div>
    </div>
    just throwing out ideas here…

    Something I have also contemplated is using classes so that everything can reused. So that if you have a series of posts on the page masthead and footer can be reused in those posts.

    Code:
    <div class="site material">
      <div class="masthead">
      </div>
      <div class="page material">
      </div>
      <div class="footer">
      </div>
    </div>

    Code:
    <div id="main">
      <div id="header">
      </div>
      <div id="page">
      </div>
      <div id="footer">
      </div>
    </div>
    just throwing out ideas here…

    Something I have also contemplated is using classes so that everything can reused. So that if you have a series of posts on the page masthead and footer can be reused in those posts.

    Code:
    <div class="site material">
      <div class="site header">
      </div>
      <div class="page material">
        <ul class="posts event">
          <li class="post event">
             <div class="header">
             </div>
             <div class="material">
             </div>
             <div class="footer">
             </div>
          </li>
          <li class="post event">
             <div class="header">
             </div>
             <div class="material">
             </div>
             <div class="footer">
             </div>
          </li>
          </li class="post event">
             <div class="header">
             </div>
             <div class="material">
             </div>
             <div class="footer">
             </div>
          </li>
        </ul>
      </div>
      <div class="site footer">
      </div>
    </div>
    The only problem I'm having is that it seems a bit complex and by using multiple classes the chances of selecting unintended elements increases.

    idk… sorta like searching for the perfect woman. Eventually… you just have to settle…

  9. #84
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by oddz View Post
    Then in theory this appropriate. However, in reality the beginning and end are implied so is there a need for those divisions anyway?
    Yes, because they show where the header ends and the footer begins. Without them you'd need to mark up the main content somehow, to illustrate what is the primary part of the document.
    Birnam wood is come to Dunsinane

  10. #85
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,287
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    If a footer or header must appear at the top of the document than its tied to presentation.
    Hmmm, it actually didn't occur to me, but I have a page where I start right off with something called "footer" which has nothing particularly "footy" about it. In fact, it should just be called "menu" because that's what it really is.

    <body>
    <div id="footer">
    a menu!!!
    </div>
    <div id="container">
    whole page in here.
    </container>
    </body>

    But, too late, it's online as a footer now : ( Visually it's a footer, positioned at the bottom of the page, but code-wise it's the main menu. Kinda sucks when later you know better but you have to keep working on the site as-is and aren't allowed to change it.

  11. #86
    SitePoint Addict rochow's Avatar
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can add a class or id to the styling h2 to separate it from the rest.
    ... which defeats the entire purpose of not using div's in the first place! Adding a class for purely styling purposes is just as unsemantic as adding a div/span/anything else.

    Code:
    <div class="tr">
        <div class="br">
            <div class="tl">
                <div class="bl">
                    <p>This is a paragraph that is...</p>
                </div>
            </div>
        </div>
    </div>
    That could be condensed to simply:

    Code:
    <div id="box"><div><div><div>
         <p>This is a paragraph that is...</p>
    </div></div></div></div>
    Then simply add:
    Code:
    #box div div div div { negate anything used so if they add a div other than the divs used for the corners it does nothing }
    While it uses non-semantic markup (every solution does) it is so much better in terms of editing. I could make no content, tons of content, 50 h2's, 1 h2 - who cares, it won't break or need classes swapped around or whatever. Many users wouldn't be able to swap things around, or even know to.

    CSS3 with mutiple backgrounds... gee, that'd be the day. As long as there is a browser with IE in the title that's not going to become standard anytime soon, they haven't even implemented the current standards let alone future ones...

    Sorry. I thought we were discussing semantic markup here, not support for broken browsers. My mistake.
    Usability & Compatibility > Semantics

    The computer sees a h1. It knows that a h1 is a dominate element regardless of where it is at. It knows a h2 has a lower importance than the h1 wherever it might be. There isn't a rule stating a h1 tag needs to appear at the top.
    Yes there is. H2 doesn't have "lower importance". A H2 is a subheading of the H1, therefore there is NO way any heading can go before the H1. Therefore, they have a set order and can't be put "just anywhere".

    The only thing were "importance" comes into it is SEO.

    Masthead perhaps, but not header and footer.
    Agree and disagree. As always, it depends upon the context in which it's used.

    Code:
    <div id="footer">
        Copyright 2008 Bobs Site
    
        <ul>
             <li><a href="#">Link</a></li>
             <li><a href="#">Link</a></li>
             <li><a href="#">Link</a></li>
             <li><a href="#">Link</a></li>
        </ul>
    </div>
    That is a very standard footer; however, that could go in the sidebar without any loss of meaning, therefore naming it footer doesn't hold any semantic meaning and just relates to the fact its placed at the bottom of the page. On the other hand though, who really cares, what else would you call it - bottom-menu? copyright? sub-menu? All don't seem as good to me as #footer.

    Therefore, its Utopian to believe that there can ever be a true separation of structure and presentation.
    As long as there are designers that will hold true Everyone is arguing about how to add tons of unsemantic rubbish to make rounded corners - well, here's the ONLY semantic solution: give the rounded corners the boot

    Fact is that what is trying to be generated is presentational and HTML is not designed to be used to markup presentation, so there will never be a perfect solution whilst there is so much presentation.

  12. #87
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,287
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Adding a class for purely styling purposes is just as unsemantic as adding a div/span/anything else.
    What better solution is there? From your comment just taken out of context, my immediate thought was this:

    Code:
    <ul>
      <li><a class="current" href="#">Home</a></li>
      <li><a href="#">About</a></li>
      <li><a href="#">Products</a></li>
      <li><a href="#">The Company</a></li>
      <li><a class="last" href="#">Contact</a></li>
    </ul>
    I dont' know any other way but with classes to change the appearance of two siblings when the CSS states "normal" styles for the rest. But they are indeed there purely for styling purposes-- nobody visiting the page is going to be reading class names to get some kind of content info from them.

    Though I agree with the hundreds of class names for styling purposes statement (with your example)-- that goes pretty overboard, esp when only the first extra element needs the class and the rest can be mentioned via the parent. They both do the same thing, they both use extra HTML for styling, but div div div div (or b b b b b) look cleaner to me.

  13. #88
    SitePoint Addict rochow's Avatar
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What better solution is there?
    That's sort of my point - there is no perfect solution unfortunately. I like my solution (deathshadows is similar principle, I just like the fact the divs wrap the content) as it is more "foolproof" when it comes to the owner chopping & changing their content.

    As for your example, yep it's not semantic, however there is no other way about it so no point sweating on it. In the case of the box with rounded corners, there isn't only "one solution".

    As I said in response what someone said about ignoring IE6 - usability and practicality are of more importance than semantics (in cases like this where something unsemantic has to be used like it or not)

  14. #89
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rochow View Post
    That is a very standard footer; however, that could go in the sidebar without any loss of meaning, therefore naming it footer doesn't hold any semantic meaning and just relates to the fact its placed at the bottom of the page.
    If that information is likely to go somewhere else on the page one day, then naming it 'footer' is not a good idea. On the other hand, if you want that info in a sidebar, it's rather likely that it would also be moved to a different position in the markup, so there'd be a structural and semantic change in addition to the visual change.

    A footer is something that will always come after the main content (structurally, and usually visually too).
    Birnam wood is come to Dunsinane

  15. #90
    SitePoint Addict rochow's Avatar
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    If that information is likely to go somewhere else on the page one day, then naming it 'footer' is not a good idea. On the other hand, if you want that info in a sidebar, it's rather likely that it would also be moved to a different position in the markup, so there'd be a structural and semantic change in addition to the visual change.

    A footer is something that will always come after the main content (structurally, and usually visually too).
    My point wasn't that I wanted in the sidebar, my point was that I could put it in the sidebar (either structurally or positioned via CSS) and it wouldn't change the meaning of the menu nor the copyright notice; therefore, 'footer' isn't a semantic name its purely presentational: "it's at the bottom, I'll call it #footer" which is just as bad as going "it's on the right, I'll name it #right".

    Someone said footer was a semantic name (can't remember who, not that it matters) and I disagree, in a majority of cases its not.

    EDIT: Looking at your site you have #copyright as the last thing on the page which is on every page, you just said that the footer is what will always come after the main content - if that was true it'd be called #footer not #copyright. Which leads back to my point - #footer is not a semantic name to be used on whatever is at the bottom of all pages (not that there is much else to call it)

  16. #91
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rochow View Post
    therefore, 'footer' isn't a semantic name its purely presentational: "it's at the bottom, I'll call it #footer" which is just as bad as going "it's on the right, I'll name it #right".
    Yes, if you have copyright information and name it 'footer' because it currently comes at the bottom, then it's presentational and 'wrong'.

    However, if you have a footer, which currently happens to contain copyright information but may contain something else in the future, then naming it 'footer' is correct, because it's semantically a footer.

    Quote Originally Posted by rochow View Post
    Someone said footer was a semantic name (can't remember who, not that it matters) and I disagree, in a majority of cases its not.
    It may have been me, but what I said (or at least meant ) is that 'footer' isn't necessarily a presentational name. A footer has a semantic meaning, but if you name something 'footer' although it isn't a footer, then you're abusing the semantics.

    Quote Originally Posted by rochow View Post
    Looking at your site you have #copyright as the last thing on the page which is on every page, you just said that the footer is what will always come after the main content - if that was true it'd be called #footer not #copyright.
    Because it's copyright information which currently happens to appear at the end of the document, it's not a footer that currently happens to contain a copyright notice. Do you see the semantic difference? I admit it's subtle, but there is a difference.

    When pigs learn to fly, hell freezes over, and I finally have time to do a redesign*, the copyright notice may appear somewhere else (structurally and visually).

    * The latter being the least probable of these.
    Birnam wood is come to Dunsinane

  17. #92
    SitePoint Addict rochow's Avatar
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Because it's copyright information which currently happens to appear at the end of the document, it's not a footer that currently happens to contain a copyright notice. Do you see the semantic difference? I admit it's subtle, but there is a difference.
    LOL damn wording. Pretty sure we're agreeing (easy to get wordy and become unclear). Someone said earlier that the last thing on the page if on every page is named the footer and the first thing on the page is named header, which isn't correct. My "argument" was that just naming whatever at the bottom #footer is wrong (same goes with #header) and I showed a common example of whats generally named the #footer, even though its semantically incorrect.

    I thought you were agreeing that the last thing on the page is the footer, which is why I brought your copyright div up (as you could move that copyright anywhere on the page and its still the copyright - whereas if it was named footer and it was moved somewhere else its wrong)

    Moving forward though, does anyone have an idea of what else to call the usual menu/copyright that's at the bottom of the page? Although I don't like #footer, in cases where its got more than just the copyright notice I'm not sure of what else it could even be called.

  18. #93
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,287
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    On one site I did, it was always a small menu and the rest was tiny legal text.

    I called it
    <div id="fineprint">
    cause that was what it was made up of. I don't think it'll ever go anywhere but the bottom of the page but for some reason I didn't call it "footer".

  19. #94
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rochow View Post
    I'm not sure of what else it could even be called.
    #siteinfo
    Used for various site related information

    #siteinfo-legal
    Copyright information etc.

    #siteinfo-credits
    Designer or other credits

  20. #95
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Adding a class for purely styling purposes is just as unsemantic as adding a div/span/anything else.
    Agreed, if the naming-convention is not portraying the relationship.

    My point wasn't that I wanted in the sidebar
    Sidebar is a 'purely' un-semantic naming-convention.
    How does sidebar 'describe' anything besides the positioning - which relates to presentation.

  21. #96
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,194
    Mentioned
    17 Post(s)
    Tagged
    5 Thread(s)
    A sidebar actually is related to the main content. Even though by mere glance you would think that side translates to positioning which isn't necessarily true.

    By a stretch content normally placed into the sidebar is related to the main content in some way. There is an argument on both side. Its quit subjective.

    The same is true for things such as masthead and header.

    I've been recently conducting some digging in terms of newspaper jargon and I think there is a lot of opportunity to potentially take common news paper jargon such those outlined below to create more semantic, but flexible and generic conventions.

    slug
    skybox
    mainbar
    jump
    ear
    copy
    oped
    morgue
    byline
    column
    clip
    cut

    Maybe a bit radical, but who knows.

    I don't think the problem has ever lied in naming the content, but wrapping it. Therefore, rather than thinking about names that describe content perhaps names that allow content to be wrapped semantically.

    Code:
    <div class="byline">
      <p class="author"></p>
    </div>
    Code:
    <div class="copy">
      <p class="story"></p>
    </div>
    Code:
    <div id="slug">
    </div>
    Code:
    <ul class="jumps">
      <li><a href=""></a></li>
      <li><a href=""></a></li>
      <li><a href=""></a></li>
    </ul>
    The last one here is probably the most radical, but perhaps it describes the function of the content more appropriately than navigation. To jump is to move from one place to another which is an alternative to the concept of navigation.

  22. #97
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Oddz - The key thing is:

    1. If you were to tell a 'blind' person only your naming conventions and content within, would it all make sense to them?

    Sidebar
    Apples
    Why does everyone love apples?

    When I see 'sidebar', I envision these names as well:
    topbar
    bottombar

    sidebar-1
    sidebar-2

  23. #98
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only thing they would get is, a visual of placement, unless they knew the 'correct' meaning behind the naming.

    Sidebar:
    A short, often boxed auxiliary news story that is printed alongside a longer article and that typically presents additional, contrasting, or late-breaking news.

    So my question is, if this is 'describing' anything besides news, is 'sidebar' used incorrectly?

  24. #99
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <div class="new-york-times newspaper">
    	.....
    	<div class="sidebar">...</div>
    </div>

  25. #100
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,194
    Mentioned
    17 Post(s)
    Tagged
    5 Thread(s)
    I agree with you.

    However, I think the correct place is somewhere in the middle in regards to practicality. In an ideal world every element would be named related to its content, but this bring up several issues in regards to practicality. It's not practical to create conventions that would cover the spectrum of all content that would ever exist on a web page. It is increasingly more practical locate patterns and derive conventions from them in a more generic sense. There is no way that one could create a standardized set of conventions that define content if the content is a variable. So ideally, the concept sounds great, but its just not practical unless you know the content which the element will contain. Evan than if your were to create a universal set of names you would be placing limits on the developer.

    Ideally, I agree, but practicality pulls me otherwise.

    Furthermore, I wasn't proposing the lone use of these names, but the combination of them. For example, a sidebar with a nav inside could be classed.

    Code:
    <div class="sidebar nav">
    </div>
    A slug regarding news

    Code:
    <div class="slug news">
    </div>
    In the end the "jargon" would act as less specific identifiers, but they would be used in combination with an identifier that relates directly to the contextually content. By itself sidebar means very little, but the power lies in combining the names to build on meaning and create more specific meaning. This allows results in a ability to generate more specific selectors without the need to using wrap,module or filler names essentially. However, it would also provide leverage of being able to style all sidebars the same or all slugs the same with one simple rule rather than using group selector.

    Here is a practical scenario:

    Code:
    <div class="editorial">
    </div>
    <div class="magazine">
    </div>
    <div class="event">
    </div>
    <div class="property">
    </div>
    If all these things appear the same they are essentially the same entity. Therefore, I feel that is appropriate to relate them though an entity. Otherwise, you need to use group selectors. Now, on a few divisions this isn't a problem, but when you start to deal with a large amount the stylesheet can become highly unorganized. Therefore, by relating them through one entity you can both easily maintain the presentational aspects of that entity through a simple rule and create a more organized stylesheet. Furthermore, this approach allows a more specific selector so that elements that are classed editorial,magazine,etc within the slug can be styled relative to that slug.

    Code:
    <div class="editorial slug">
    </div>
    <div class="magazine slug">
    </div>
    <div class="event slug">
    </div>
    <div class="property slug">
    </div>
    Code:
    .slug {
    }
    You would never use one of these conventional names on its own, but in combination with a class that specifically relates to the content.

    That went a bit of topic.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •