As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
CSS doesn't support constants, particularly for colors, which makes css color maintenance a real pain.
Before I roll my own solution, are there any good libraries that work with tomcat that support the concept of CSS constants?
Main options:
Newest is actual variables in the browser - http://css3.bradshawenterprises.com/blog/css-variables/ though support is (currently) poor. Will probably improve through 2013.
Mainstream is "Sass" - http://sass-lang.com/ - "Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It’s translated to well-formatted, standard CSS using the command line tool or a web-framework plugin."
Sass variable: $blue: #3bbfce;
Also, very popular, "LESS" - http://lesscss.org/ - "LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions.
LESS runs on both the server-side (with Node.js and Rhino) or client-side (modern browsers only)."
LESS variable: #color: #4D926F;
Both Sass and Less compile into css.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Recently i read the http://css-tricks.com/sass-vs-less/ post and one paragraph call my attention, related to CSS3 Helping
So what this comes down to is: Sass has Compass and LESS does not. But
it goes deeper than that. The attempts at creating a real robust
project like Compass for LESS haven't succeeded because the LESS
language isn't robust enough to do it properly. Winner: Sass
One of the robustness explanations says:
Sass has actual logical and looping operators in the language.
if/then/else statements, for loops, while loops, and each loops. No
tricks, just proper programming. While guarded mixins are a pretty
cool, natural concept, language robustness goes to Sass. This language
robustness is what makes Compass possible.
I feel uncomfortable with such kind of affirmation and have my doubts. This days almost everything is possible with Javascript (LESS compiler).
Question:
It's possible to build a Compass like tool on top of LESS or the language (JS) isn't robust enough like the post says ??
Note:
The answer should be focus in the fact that LESS is or isn't robust enough to build a Compass like tool rather than your personal preference in the subject.
Focus on why (language facts) you do that kind of affirmation.
LESS has it (robustness) too
lolmaus's answer implies LESS does not have the same things as SASS, so to pattern off his answer, let me simply respond as follows:
LESS has at least one Compass like work in progress through compless, as well as semantic grid systems (lessframework, semantic grid, fractionless), media query manipulation tools (less media query solutions), various built in math and color tools, styling libraries (Bootstrap, 3L, less elements, LESS hat, Clearless), etc.
In short, robustness has nothing to do with it. Both are robust enough. SASS with Compass has perhaps had more attention paid to it (more developments done), but both SASS and LESS have plenty of supporters, and nearly parallel capabilities.
It is the ecosystem of numerous Compass extensions for all possible purposes that makes SASS really shine.
We have semantic grid systems (Singularity, Susy, Neat, Zen Grids...), media query manipulation tools (Breakpoint, Breakpoint Slicer...), various math and color tools (Toolkit, Modular Scale, Responsive Calculator, Color Schemer, Blend Modes...), styling libraries (Compass, Bourbon, Foundation, Sassy Buttons...), etc.
With SASS, you don't have to build scaffolding or reinvent the wheel over and over again.
Here's an example of a responsive gallery grid: http://sassbin.com/gist/5670191/ Can you solve the task with that little code in LESS?
> It's possible to build a Compass like tool on top of LESS or the language isn't robust enough like the post says ??
Theoretically, there are no limits to do that. Practically, no one would bother because there's the Compass ecosystem already.
I did some reading on blogs and things that I believe to be reliable resources and ultimately decided on SASS. The bottom line is whether or not the language that the compiler/interpreter is based on is robust and powerful only means that the capability to make a better compiler/interpreter which can process a more robust input language may be there, but it in no way indicates that this is the case. I use SASS and I enjoy it. You could debate the merits of apples and oranges for days, but ultimately you need to find the one that works best for you.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm wanting to know if there is anyway I can see the css support for webkit browsers? I've had a look at
Caniuse and I've had a look
at PPK's website. I'm really after something what Microsoft have done for IE.
If there is anything out there can you post it please?
WebKit seems to be poorly documented, with no official summary or reference published. Here are some resources:
Safari CSS Reference by Apple; not very detailed
MDN CSS Reference, extensive but not complete summary of support to CSS in different browsers, including a separate page of WebKit extensions
CSS666, a summary of CSS support in browsers, compact, but has some info not present at MDN
Sitepoint CSS Reference, yet another summary of CSS support
Webkit CSS properties, compilation of -webkit- properties
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I have since the beginning been annoyed with the compatibility of CSS. Whats the best practice for coding css, that works with the most common platforms...
( IE7+, Firefox, Safari, Chrome AND iPad / iPhone, Blacberry, Android)
Are there any list to be found anywhere with known differences ?
Thanks!
Jakob
I often use CSS reference on http://www3.w3schools.com/cssref/default.asp - for each css element, they give the compatibility list of various browsers and also unique behaviour of some, if applicable.
For example, have a look at http://www3.w3schools.com/cssref/pr_class_display.asp for display property. It shows that the property is supported in all browser, and then gives details of specifics of IE:
The values "inline-table", "run-in", "table", "table-caption",
"table-cell", "table-column", "table-column-group", "table-row",
"table-row-group", and "inherit" is not supported in IE7 and earlier.
IE8 requires a !DOCTYPE. IE9 supports the values.
Similar description is provided for all other CSS elements. I'm not sure if it will address all of your issues, but it certainly is a very good resource.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
i have taken over a website that has tons of css files and lots of inline css as well. Is there any tool that can show me a visualization of how this stuff is organized as i have a strong feeling that. Many pages are bringing in more css than necessary
Also, i want to remove all the inline formatting as well into css files. Is there any refactoring tool that does even this by itself?
IE8 dev tools can show you all CSS inheritance tree (including files where this particular style is defined in)
Firefox has tons of plugins that can do the same.
This is not a direct answer to your question - I don't know of a true refactoring tool for CSS. One that I've used to create and preview CSS easily is TopStyle - I'm on v3.5 Pro, and they've got v4 out now. There may be better or less expensive alternatives out there; I'm not an expert.
You might also want to check out Firebug: http://getfirebug.com/
Dreamweaver, it can convert inline css to external css file.
also it can view all css files and its rules in a outline view, and you can easily rename all of it.
The Dust-Me Selectors Firefox extension could help you find CSS that isn't used at all, it's a good first step.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've been using Nicole Sullivan's "Object Oriented" CSS grid for a while now (hate the term, though) and have found it to be quite good. However, as I get more experience with grids, I'm noticing a lot of other frameworks out there; in particular the 960 Grid System and the Yahoo! UI Library.
I'm looking for other peoples' experiences with these alternatives (or others) so I can make a more well-founded decision on whether to change or not.
I think Blueprint is the best.
Also review comments posted at: https://stackoverflow.com/questions/589184/help-me-choose-a-css-framework-960-vs-blueprint-vs
I found the noupe site has great comparisons for CSS frameworks and helped me choose: http://www.noupe.com/css/5-popular-css-frameworks-tutorials-tools-for-getting-started.html
If you are using rails framework, you should consider using compass which is layer over these frameworks (As suggested by Alan below).
I would recommend Blueprint used from within Compass. Compass reduces redundant CSS styles and has variables and classes. Apart from that, I have found Blueprint to be easy to use.
What about the twitter bootstrap framework. It good for me