Lieray 6.1 CE is released and many of you have started using it. There are lots of features in Liferay 6.1 and one among them is the facility to use SASS in Liferay.
SASS:
SASS( http://sass-lang.com ) stands for Syntactically Awesome StyleSheets. It is a tool that allows you to write CSS more easily . It is an extension of CSS3 which means whatever CSS file is a valid SassyCSS (SCSS). It allows you to use variables, nested rules, mixins, inline imports, interpolation, arguments, manipulating colors and more with a fully CSS-compatible syntax. Sass generates well formatted CSS and it is much easier to organize and maintain your stylesheets.
Compass :
Compass( http://compass-style.org ) is an open-source CSS authoring framework which makes easier to build and maintain your markup and stylesheets. By using compass, you can write your own stylesheet in Sass instead of CSS.
How does Compass Work?
It can be imported using @import "compass" in CSS. SCSS is built based on the CSS3 specification which means that it is highly compatible with CSS3. SCSS also has all the power of Sass.
We’ll see here as how to use the variables, nested rules, mixins, inline imports, interpolation and arguments through CSS files.
Variables:
We’ll see how to use variables and a custom mixin to show how Compass makes it easy to reuse colors, sizes, and other values without repeating.
/* Variable Declaration */
/*These variables can be used globally throughout your stylesheets */
Example:
Liferay6.1 Liferay 6.0.x
Mixins:
By using the mixin, you can re-use the styles, properties & selectors without copying to other selectors. To achieve this , you need to package the properties with @mixin and to include it in other element with @include.
Example:
Liferay 6.1 Liferay 6.0.x
Nested Rules:
Nesting avoids repeating CSS selectors and also keeps the style compact for a certain area of the User Interface.
Let us have a look at an example of custom.css code for navigation part in themes. After using the nesting rule, the code should look like this :
Liferay 6.1 Liferay 6.0.x
Parent Reference:
Parent reference allows you to reference a parent selector in the case of pseudo-classes like :hover, :link, :visited and :active states.
Liferay 6.1 Liferay 6.0.x
Interpolation:
We can also use SassScript variables in selectors and property names using #{} interpolation. Here’s the example:
Liferay 6.1 Liferay 6.0.x
Liferay6.1 allows you to use Sass which helps the code be simpler for mobile site design. (Thanks to BradleyWood’s solution in this forum post ).
As said in Sass , it makes CSS fun again and with Liferay 6.1, you can easily create manageable style sheets and start updating to Liferay 6.1 and use Sass to manage your style sheets .
This text is priceless. How can I find out more?
ReplyDeleteHere is my web pageon survey bypass
I'm truly enjoying the design and layout of your website.
ReplyDeleteIt's a very easy on the eyes which makes it much more enjoyable for
me to come here and visit more often. Did you hire out a designer to create your
theme? Outstanding work!
Here is my web page :: After Effects Tutorial
This comment has been removed by the author.
ReplyDeleteHi Himanshu.
ReplyDeleteI am searching the best way to compile css by sass in a maven liferay theme.
Any advice?
This article seems interesting but the page doesn´t load the images.
Could yo fix fix it?
Thanks anyway.
Useful content, I have bookmarked this page for my future reference.
ReplyDeleteccna Training in Chennai
ccna Training near me
ccna course in Chennai
RPA Training in Chennai
R Programming Training in Chennai
UiPath Training in Chennai
I am really enjoying reading your well written articles.
ReplyDeleteIt looks like you spend a lot of effort and time on your blog.Keep Doing.
Digital Marketing Training in Bangalore
Digital Darketing Courses in Bangalore
Best Digital Marketing Courses in Bangalore
Digital Marketing Institute in Bangalore
Devops Training and Certification in Bangalore
Best Devops Training in Bangalore
Thanks for sharing this information. This is really useful. Keep doing more.
ReplyDeleteTOEFL Training in Tambaram
TOEFL Coaching Classes in Guduvanchery
TOEFL Coaching Centres at Tambaram
TOEFL Classes in Chennai OMR
TOEFL Coaching Classes in Siruseri Chennai
TOEFL Course in Karapakkam
TOEFL Training near me
Awesome post, continue sharing more like this.
ReplyDeleteeasyblogging
Education
your blog information's are really creative and It contains full of new innovative ideas.thank you for sharing with us.please update more data.
ReplyDeletedevops Course in Anna Nagar
Best devops Training Institute in Anna nagar
devops Certification Training in Anna nagar
devops Training in Ambattur
Amazing Post. The idea you have shared is very interesting. Waiting for your future postings.
ReplyDeletePrimavera Training in Chennai
Primavera Course in Chennai
Primavera Software Training in Chennai
Best Primavera Training in Chennai
Primavera p6 Training in Chennai
IELTS coaching in Chennai
IELTS Training in Chennai
SAS Training in Chennai
SAS Course in Chennai
Most amazing post thanks
ReplyDeleteCCNA training in chennai
Wonderful Post. Brilliant piece of work. It showcases your in-depth knowledge. Thanks for Sharing.
ReplyDeleteIonic Training in Chennai
Ionic Course in Chennai
Ionic Training
Ionic Corporate Training
Ionic Training Institute in Chennai
Ionic Training in Adyar
Ionic Training in Porur
Awesome Post. Great Content. It is very inspiring to read your post. Waiting for your future updates.
ReplyDeleteIoT courses in Chennai
IoT Courses
Internet of Things Training in Chennai
Internet of Things Training
Internet of Things Course
IoT Training in T Nagar
IoT Training in Velachery
Thank you for writing this informative post. Looking forward to read more.
ReplyDeleteResponsive Website Design Services India
very very informative post for me thanks for sharing
ReplyDeleteBlockchain Course in Bangalore
aaj mein aap ko time badhane wale condom ke baare mein btaunga vo condom jine condom ko use karne se aap long time tak sex kare skte hain bana kise medication ko kaha kare aur aap safe sex bhi kare skte hain aise karne se aap ko koi sexual disease bhi nhi hogi
ReplyDelete