Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other How you guys handle normalize.css

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #173853
    nixnerd
    Participant

    So, what I generally do is download the latest version when I start a project and save it as an SCSS partial to be @imported in my master SCSS file. However, this leaves a little to be desired. First of all, it’s one more step in project setup AND it requires me to be constantly updating my normalize.css files when new versions come out. Lame. And, since it’s SCSS, it needs to be recompiled and pushed to the remote server. Again, lame.

    So, I checked to see if there was a latest version link and lo and behold, there is:

    http://necolas.github.io/normalize.css/latest/normalize.css

    Now, I don’t really have a problem linking to an external style sheet… when it seems reliable to do so. But I’m wondering if this is a good idea for normalize.css. What if they dev moves the file? What if I get flashes of unformatted elements when the page loads? What if page load takes longer? But, on the other hand, it never needs updating.

    Then I wonder if I even NEED to update normalize.css on a given project. I mean, if it ain’t broke right?

    What you you guys do?

    #173863
    shaneisme
    Participant

    I just keep it compiling into my main CSS via SASS with Gulp. Sounds like something you’re doing now… of course, I don’t go checking for a new version all the time, maybe once a quarter or so.

    #173869
    __
    Participant

    I compile it into each project as well.

    Then I wonder if I even NEED to update normalize.css on a given project. I mean, if it ain’t broke right?

    Probably not often. It was under much more frequent development in the past. Looks like the most recent change was in January… but AFAIK, Nicolas Gallagher does keep up with new developments. Browsers will always have different default appearances.

    #173872
    nixnerd
    Participant

    I think you guys are right. The method I’m using now is probably the best way to go about it. It’s not ‘perfect’ but at least I control it.

    One thing I could do is write a simple script to pull the latest version into a local folder. Then, I could probably import it with an absolute file path on all my projects. That way, as I’m going about my regular git activity, the newest version of normalize is being compiled and updated without me really even knowing it.

    This may not be the best idea either and it may be harder than I think. But… what can I say? I’m a sucker who is always seduced by less work :)

    #173908
    nixnerd
    Participant

    One thing I could do is write a simple script to pull the latest version into a local folder. Then, I could probably import it with an absolute file path on all my projects. That way, as I’m going about my regular git activity, the newest version of normalize is being compiled and updated without me really even knowing it.

    Hey @traq, I could just use curl for this couldn’t I? That seems like a REALLY easy way to go about it. Curl + absolute file path FTW! That way I get the best of both worlds.

    I’ll probably need a python script to poll the url for changes and then upon a change, run the curl script to get it and print it to my master normalize.css file. I love it.

    #173910
    nixnerd
    Participant

    I’ll probably need a python script to poll the url for changes

    Nope. I’ll just set up a daily cron job. Not NEARLY as sexy but it will work. Worst possibly outcome: My normalize.css is 1 day behind :)

    #173959
    __
    Participant

    why not

    wget "https://.github.com/necolas/normalize.css/raw/master/normalize.css" -O <your/filename/here/normailze.css>
    

    I wouldn’t bother updating it daily.
    Once at the beginning of the project is surely good enough.

    #173963
    nixnerd
    Participant

    why not

    Ehhh… because I have always used curl. Although curl doesn’t have recursive functionality like wget… so it’s got that going for it.

    I wouldn’t bother updating it daily.

    You’re right.

    Once at the beginning of the project is surely good enough.

    In that case, there’s a better way to do ALL of this. I already wrote a bash script that sets up a project for me in totality. By that I mean, It creates the folder, inserts a custom HTML skeleton, creates a script.js file, causes compass to create a new SASS folder and tells it to start watching/polling, imports my most used mixins, and it does a git init for me.

    It would be really easy to have it also curl the latest normalize.css. Or, wget… whichever.

    However, it would still probably be cool to have a monthly cron to update all projects’ normalize.css. The question is… why not? Virtually no overhead and will take 1 min to set up.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Other’ is closed to new topics and replies.