homepage Welcome to WebmasterWorld Guest from 54.205.106.111
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Using Sass or Less
going from local development to live server
brandozz




msg:4635967
 5:15 pm on Jan 8, 2014 (gmt 0)

I'm thinking about using the Bones theme for WordPress in a new project. The Bones theme uses Sass or Less as the pre processor.

I know you must have ruby and sass installed the live server where the site will reside. Once ruby and sass are on the server is there anything else that you need to do to compile the less or sass files?

 

Fotiman




msg:4635992
 6:51 pm on Jan 8, 2014 (gmt 0)

You actually DON'T need ruby and Sass installed on the server where the site will reside. Your local development environment can use Ruby/Sass and then the output (CSS files) can be pushed to your server. You may want to look into something like Compass, which includes Sass but provides a bunch of useful mixins.

brandozz




msg:4635993
 6:56 pm on Jan 8, 2014 (gmt 0)

@Fotiman, thank you for clarifying that for me!

brandozz




msg:4635995
 6:58 pm on Jan 8, 2014 (gmt 0)

So with Compass I don't even need to bother with installing ruby on my development machine?

Fotiman




msg:4636001
 7:08 pm on Jan 8, 2014 (gmt 0)

Compass is still a Ruby gem, so you'd still need it installed. However, you could try something like Scout [mhs.github.io], which runs Sass and Compass in a self-contained Ruby environment so you'll never have to worry about your Ruby setup.

swa66




msg:4636048
 10:52 pm on Jan 8, 2014 (gmt 0)

If you have to use that just grab the css off of a test installation and deploy the css on the production environment.

But the good thing about css: you do not need it at all.
It's even against the philosophy of CSS to have it as it'll create less efficient CSS than what you'd do if you'd use CSS properly. [Seriously!]

The main thing to know is that you can use specificity and order in CSS to group what you need together.
The most common argument I've seen is vaing variables to avoid repeatign colors in every class. Well, let's say you have a company color #123456 that you need on a bunch of classes, elements etc.

Nothing stops you from adding it just a few times in just one location of your CSS
h1, h2, h3, h4, h5 ,h6, .tltle, a {
color: #123456;
}
.box, .title, .footer {
border-color: #123456'
}
And then set the specific border withs you need on the different element s where you need them

Just remember that you do not need to define all of the properties you want on any element in one go, you can select an element a whole bunch of times as needed.

brandozz




msg:4636060
 1:08 am on Jan 9, 2014 (gmt 0)

@Fotiman

I installed Ruby, Sass and Compass and I have my WordPress install ready to go with the Bones theme. Do I need to point compass to watch the sass folder for changes? So when my styles.scss file is saved it is automatically compiled?

brandozz




msg:4636065
 1:51 am on Jan 9, 2014 (gmt 0)

@Fotiman

Ignore the last question, I downloaded Livereload and installed the extension into Chrome.

benihana




msg:4636146
 11:20 am on Jan 9, 2014 (gmt 0)

It's even against the philosophy of CSS to have it as it'll create less efficient CSS than what you'd do if you'd use CSS properly. [Seriously!]


Any tool in the wrong hands will produce poor results.

Fotiman




msg:4636185
 4:07 pm on Jan 9, 2014 (gmt 0)


It's even against the philosophy of CSS to have it as it'll create less efficient CSS than what you'd do if you'd use CSS properly.

I somewhat disagree. Yes, it *can* produce less efficient CSS, but it depends on how you use it.

drhowarddrfine




msg:4636314
 4:24 am on Jan 10, 2014 (gmt 0)

Every code generator I've seen has always failed in some way at some point and falls by the way side. These, too, will fail.

benihana




msg:4636395
 10:23 am on Jan 10, 2014 (gmt 0)

@drhowarddrfine yes. If you dont know what you're doing.

I use SASS all day every day and generate highly efficient, modular, scalable CSS that is simple to maintain.

Its a tool. Use it correctly, and it will reward you.

drhowarddrfine




msg:4636468
 1:41 pm on Jan 10, 2014 (gmt 0)

@benihana Every code generator I've seen has always failed in some way at some point and falls by the way side. These, too, will fail.

brandozz




msg:4636570
 8:50 pm on Jan 10, 2014 (gmt 0)

@Fontiman, I have Livereload installed with the browser extension in chrome but it doesn't seem to be compiling. I've made a couple of adjustments to link colors and livereload is displaying messages that the files were updated, complied and refreshed but I'm just not seeing the changes in the css.

Any idea what the issue may be?

Fotiman




msg:4636588
 9:32 pm on Jan 10, 2014 (gmt 0)

I've not used Livereload, so I don't think I can be much help. Sorry.

benihana




msg:4637622
 3:33 pm on Jan 15, 2014 (gmt 0)

@drhowardfine

I respectfully disagree. Sass compiles code as I want it.

I think if you KNEW WHAT YOU WERE DOING WITH IT you may not have such a patronising tone.

your entire argument is based on other code generators you have used. I have categorically stated that it works extremely well for me, unless you have something tangible to add, please leave it to people who know what they are talking about.

I remember now why I stopped coming here.

[edited by: benihana at 3:35 pm (utc) on Jan 15, 2014]

benihana




msg:4637623
 3:33 pm on Jan 15, 2014 (gmt 0)

-

drhowarddrfine




msg:4637934
 3:15 pm on Jan 16, 2014 (gmt 0)

@benihana It may compile code as you want it but that doesn't mean it's the best solution. Automatic code generators for HLL to HLL never trump human coding.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved