Details
-
Improvement
-
Resolution: Fixed
-
Neutral
-
1.3
-
None
-
-
Empty show more show less
-
Content Mngmt 6
-
3
Description
To prevent the complexity of styling in css in the future

DEV Note:
- Define scss file replace for current css
- Add maven plugin to build scss -> css, the css file will be placed in target
- Using @Stylesheet to include the new built css
maven plugin:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>
import com.vaadin.sass.SassCompiler
import java.util.regex.Matcher
new File("${project.basedir}").eachFileRecurse {
if (it.path =~ /\/target\/.*(\/VAADIN\/.*)(\/.*)\.scss$/) {
def sassFile = it.path
def cssPath = "${project.basedir}/target/classes"+Matcher.lastMatcher[0][1]
def cssFile = cssPath + Matcher.lastMatcher[0][2]+".css"
println "Compiling Sass file " + sassFile + " -> " + cssFile
new File(cssPath).mkdirs();
SassCompiler.main([sassFile, cssFile] as String[])
}
}
</source>
</configuration>
</execution>
</executions>
</plugin>
Checklists
Acceptance criteria