Can someone point me to a Maven dependency I can add to my POM to minify a file using modern CSS?
Before you say to use com.samaxes.maven:minify-maven-plugin, note that it breaks calculated values: https://github.com/samaxes/minify-maven-plugin/issues/161
In fact any CSS minifier based on YUI Compressor will break calculated values: https://github.com/yui/yuicompressor/issues/268
And com.samaxes.maven:minify-maven-plugin/YUI corrupts the file if it contains certain sequences such as the end of a comment */*… (such as found in minified Bootstrap Reboot): https://github.com/yui/yuicompressor/issues/313 .
So is there no CSS minifier for Maven that works with modern CSS?
Related
I've read that bootstrap.css already includes a version of the code from normalize.css, so is it redundant to use both files?
In other words, if I am using bootstrap do I not need to use normalize.css? Or should I use both files to thoroughly ensure cross-browser compatibility?
Bootstrap does have normalize.css included, so it would be redundant to include it elsewhere.
Bootstrap's documentation on normalize.
Bootstrap 4 (Beta) uses Reboot, which builds on Normalize, which would also make including it elsewhere redundant.
What is the extent of CSS3 support in JavaFX? According to documentation
JavaFX Cascading Style Sheets (CSS) is based on the W3C CSS version 2.1 [1] with some additions from current work on version 3 [2]
https://docs.oracle.com/javase/8/javafx/api/javafx/scene/doc-files/cssref.html#introscenegraph
Cannot find anything specific here.
1) However how much percentage of CSS3 is supported in JavaFX?
The CSS3 specification must have come along way since this was first mentioned in the JavaFX CSS specifiaction.
2) What from CSS3 is supported?
There is only one mention of CSS3 in the JavaFX CSS specification.
3) Is it possible to use SASS with JavaFX CSS?
4) What changes does Java 9 have in regards of CSS support?
Although this is a 2yo question, I will answer for the sake of people. There is so little information about JavaFX css and sass, so I hope this answer will be of a help to someone.
1+2) I don't know the exact percentage but my experience with CssFX shows that very little original css3 code got into my css files. Most of the attributes are CssFX ones. Furthermore, there are many css3 attributes that defined on some JavaFX component, but not on others. I suggest you just learn it while going.
3) Yes, it is possible, and I did it just now in my current project.
Sass is a powerful framework to use with css, but eventually, the sass compiles the sass/scss code to a regular css, which can be used in your JavaFX app. just use the CssFX attribute in the sass code instead of the standard css3 attributes.
I'm using eclipse, so I've downloaded LiClipse from the market, which lets me view my .scss files from within their eclipse built-in editor. Sometimes I use SublimeText instead because of its extra tools.
About the sass/scss to css compilation, as I'm working with Maven, I use the maven-sass-plugin (specifically this one) to compile my project's scss files every time that I run my application. In addition, I've added to my project a builder, which compiles my scss files every time that a scss file has been changed (Sass builder example)
4) This is a question about Java 9 css support, which is barely related to the main topic of this question - which is JavaFX css - and should be asked as another topic.
I am looking for a CSS minifier (or minifier option) which would remove all the vendor prefixes, expecting all CSS3 to be working without prefix.
Here are the reasons:
I intend to use prefix-free which allow to add those vendors on the fly, client-side
I do not expect handling browsers where javascript would be disabled
The main goal is to have the smallest CSS
Another goal is to not handle vendors in my CSS files, and I do not want Sass mixins or Stylus to add them automatically
I want a minifier so that I can use any library like Foundation or Bootstrap without modifying them
So, are there any minifier out there supporting such an option, or a standalone minifier which I could use to, given some input files (or stream), get output CSS files (or stream) without the prefixed properties, only the standard CSS property?
So, as I couldn't find anything, I did my own CSS vendor de-prefixer. Here is the source, still a prototype, but working and usable:
https://github.com/huafu/css-devendorize
I'm using Boilerplate and Compass on the same project.
Boilerplate have normalizer.css and main.css. and Comapass have screen/print/ie.css.
Is it a good idea to have both the css resets of both libraries or are they just duplicates?
(Compass's files will be linked after Boilerplate's files).
I'm using zurb with rails. I overrode some of zurbs default css by adding changes to app/assets/stylesheets/application.css
But precompilation seems to append all the other css files to this one. Is there any way to ensure that a certain css rule will be the last one to be precompiled to application.css?
the order in which the assets are compiled can be specified in the manifest files for js and css http://guides.rubyonrails.org/asset_pipeline.html#manifest-files-and-directives
Use many requires in your application.css.scss
*= require css1
*= require css2
...