SitePoint Sponsor

User Tag List

Page 8 of 8 FirstFirst ... 45678
Results 176 to 188 of 188
  1. #176
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    CSS>Excel>CSS, wow. You're way more dedicated than I am, man : )
    he's doing it wrong maybe, but at least he's doing it right

    this only shows once again the need for a good productivity tool for css.

    the more i look at it the more it seems to me that css was the html achile's heel far too long now. something gotta change.

  2. #177
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    To me it sounded like the rarer - less common - styles were pasted back into the HTML markup itself, i.e. between the <style> which is rather weird unless I read that part wrong.

  3. #178
    I Use MODx kenquad's Avatar
    Join Date
    Dec 2009
    Posts
    424
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AllanP View Post
    I like neat coding, so I copy the CSS into Excel, label each rule with its page name and sort the rules into alphabetical order.

    I then put rules that appear on many pages into an all.css file, which load into every page on the site.

    Rules which only appear in one page are pasted into the style section of that page only. All rules are pasted in alphabetical order, which makes it easier to find things later on.

    It's a bit of a pain to do it, but it makes life a lot easier later on.
    I'm not sure I quite understand how this works, but it sounds exceedingly painful.

  4. #179
    I Use MODx kenquad's Avatar
    Join Date
    Dec 2009
    Posts
    424
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by noonnope View Post
    this only shows once again the need for a good productivity tool for css.
    I'm with you on that.

  5. #180
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AllanP View Post
    I like neat coding, so I copy the CSS into Excel, label each rule with its page name and sort the rules into alphabetical order.

    I then put rules that appear on many pages into an all.css file, which load into every page on the site.
    That sounds fishy to me -- if the time and effort put into import/export in excel (of all things)... I mean at that point, why not just type it in properly from the start?

    If you are finding that helping, I would suspect there's probably something fundamentally flawed with your markup or CSS approach in the first place... like a nasty case of "not every DIV needs a class, not every element needs a DIV around it and not every element needs it's width set" or some similar phenomenon.

    Quote Originally Posted by noonnope View Post
    this only shows once again the need for a good productivity tool for css.
    The only time you should need a 'tool' is for cleaning up other people's messes who still think it's 1997... and for that we have dragonfly/firebug.

    If you are making it yourself there's ZERO excuse for not being able to type it in PROPERLY in the first place -- but given that from what I see of most other people's work with a total lack of understanding of the cascading part of "cascading style sheets", lack of grasping the simple rules of specificity, or even recognizing the advantages of one property per line and single tab for properties formatting, it's no wonder there are those who want some sort of tool to sleaze their work out for them.

    But again it's only as complicated as people make it... and mein gott a lot of people make it complicated.

  6. #181
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by xhtmlcoder View Post
    To me it sounded like the rarer - less common - styles were pasted back into the HTML markup itself, i.e. between the <style> which is rather weird unless I read that part wrong.
    that's why i said "he's doing it wrong maybe" he forgets about the power of caching.

    but "he's doing it right" he has a system. having too much trouble with it, made me assert "the need for a good productivity tool for css"

  7. #182
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,233
    Mentioned
    47 Post(s)
    Tagged
    1 Thread(s)
    he forgets about the power of caching.
    No. If you have a style that only appears on one page, what does it matter if they are on the only page to use them? You cache that HTML page, but only if you visit it.

    So long as it's not some whole CSS stylesheet, but a few lines of code, I don't see the difference caching-wise. If you never go to the terms&conditions page and you have a few lines of styles for ol's and dl's, then caching makes no difference: either all your styles are in one stylesheet, and it gets loaded and cached once but is a little larger than it would be, or those styles are never asked for except in the less-likely even that the terms&conditions page is loaded: and since that HTML isn't cached until someone visits that page, a few lines of CSS getting cached only when that page does... I don't see how it matters.

    Not that I do it. We have a page where we have styles in the HTML, but that's because someone insisted in being able to change the url's of CSS background images. Bleh.

  8. #183
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    probably yes, if you go to that page repeatedly.

    If you never go to the terms&conditions page
    another angle:
    • why put the css in all.css at all. what if the terms&conditions page is the biggest of them all style sheet wise?
    • why put general styles in one file for all the elements. why not just put in all.css, styles for the elements having a use ratio above, i don't know, 68&#37; and keep the rest like he said



    it seems to me you're saying caching works only if the cake slice it's big. if it's small, why bother eat it in the first place, right? well, because it's yummy! :cake: (apparently there is no cake smilie )

    eh, well, it's for the better:

  9. #184
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,233
    Mentioned
    47 Post(s)
    Tagged
    1 Thread(s)
    *drool*

    No, what I meant was, if you have one rule that only ever shows up for one page, then what does it matter if it's cached in the main style sheet (making it larger) or if the user just grabs it when they happen upon that page?

    Most of my CSS applies to ALL my pages, so I use one stylesheet. But, mostly that's maintenance reasons. IF I had a style that only applied to one page, especially a page that was least likely to be visited, I don't believe I'd be losing any benefit by putting that one style in the HTML page itself. Move a few kb away from the main css, add a few kb to the special page. Meh. I don't think you'll notice any speed difference in that sort of situation.

    AllanP sounded like he did it quite often though, and who knows how much would be too much... I'm just stating a hypothetical situation and claiming that in that situation, it wouldn't matter either way. I certainly wouldn't separate all my styles into various pages. I'm much too lazy for that. Larry Wall claims Laziness is a Virtue of Programmers, and I believe the Laws of Larry : )

    Mmmm, chocolate...

  10. #185
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by noonnope View Post
    it seems to me you're saying caching works only if the cake slice it's big. if it's small, why bother eat it in the first place, right?
    Thing is, there's ANOTHER reason to use caching -- it's called pre-caching (also known as pre-buffering)

    If your average visitor goes to three pages, and those three pages have enough unique styling on them to all use their own unique CSS in addition to the common elements, loading it all together on the first page might delay firstload, but make all the subpages SEEM to load faster. It's like the old-school javascript ******** of loading your :hover images ahead of time - only more sensible in doing it; akin to putting your normal, current and hover states on a mouse-over in a single image file.

    It's also ANOTHER reason for separation of presentation from content, as the more presentation (and therein code) you can rip out of the markup the more that can be cached/buffered ahead of time, saving bandwidth later on.

    See a forum skin for example... Thousands of pages of identical styling served daily where the only thing different is the content inside that styling -- so the more you can move out of the HTML the better. (see why I think vBull 4 is ineptly coded garbage).

    I mean, if you are serving 60k of markup on the forum index and the ENTIRE CSS for the forums only comes to 9k after compression (50k prior) is there ANY reason not to send that entire 9k up front? You're pre-caching for when they go into a topic list, or the reply list, or making a reply.

    ... AND saving handshakes further into the site... and file requests on the server.

    In that way, it becomes a question of traffic and user behavior.

    Kind of like FTP, what takes longer to upload via FTP; two-hundred separate small files of 1k each, or a single 200k file? The overhead of handshaking, file seeking, and running the compression algorythms multiple times can often outweigh the bandwidth cost (IF ANY).

    Besides, if you're total CSS for screen media totals more than 20k after gzip compression on the server, you've probably totally screwed the pooch in terms of building your code in the first place.

    Off Topic:

    Oh, and can I have a slice without the pecans? I hate pecans, but never met a chocolate I didn't like... except white chocolate... which isn't really chocolate so I guess I'm ok then.

  11. #186
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Off Topic:

    everyone's invited! as many slices as you like!

    but i must say i also like white chocolate. but i have one way of doing it that might help: i make homemade chocolate, with one layer using cocoa powder, milk powder, hot sugar syrop, rum essence, roasted nuts (not pecans) and butter, and one layer w/o cocoa and the hot sugar syrop made with different 100&#37; fruits juice instead of with water. making it like that will change the colour for the white part to pink, red, orange, depending on the fruits. all that crammed between two wafer sheets! hmmmm....

  12. #187
    SitePoint Member
    Join Date
    Aug 2010
    Location
    USA
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To organize CSS I would use more than 1 style sheet.

  13. #188
    SitePoint Evangelist
    Join Date
    Jun 2008
    Posts
    455
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have my CSS in separate files:
    - reset
    - layout
    - content
    - forms

    This makes managing different items easy and keeps everything simple. When the files are on the server they are merged into one file and the file is then cached. And that is the file that is called rather than several separate files.


    I find this method to be perfect for me however there are some who dislike the method.

    Cheers


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
  •