Simple theme creation using Sass

Slides:



Advertisements
Similar presentations
Wordpress Training with Sarah Sibert. How To... Removing elements from your theme – search bar/dates on posts/comments Change the styling of headings.
Advertisements

HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
HIGH LEVEL OVERVIEW: CSS CSS SYNTAX CONSISTS OF A SET OF RULES THAT HAVE 3 PARTS: A SELECTOR, A PROPERTY, AND A VALUE. IT’S NOT NECESSARY TO REMEMBER THIS.
Web Pages Week 10 This week: CSS Next week: CSS – Part 2.
Cascading Style Sheets
/k/k 1212 Cascading Style Sheets Part one Marko Boon
UNDERSTANDING CSS: THINKING INSIDE THE BOX The Cottage Garden The cottage garden is a distinct style of garden that uses an informal design, dense planting.
Today CSS HTML A project.
The Future of CSS and JavaScript Today Daniel Laughland Forward Thinking.
Chapter 3 – Designing your web pages Dr. Stephanos Mavromoustakos.
Introduction to CSS. What is CSS? A CSS (cascading style sheet) file allows you to separate your web sites (X)HTML content from it’s style. Use your (X)HTML.
Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 1.
Very quick intro HTML and CSS. Sample html A Web Title.
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
1 Web Developer & Design Foundations with XHTML Chapter 9 Key Concepts.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
Cascade Style Sheet Demo. Cascading Style Sheets Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g., fonts, colors, spacing) to.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Class four: the box model and positioning. is an HTML tag which allows you to create an element out of inline text. It doesn’t mean anything! try it:
An empirical study on the use of CSS Preprocessors Davood Mazinanian - Nikolaos Tsantalis Department of Computer Science and Software Engineering Concordia.
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
4.01 Cascading Style Sheets
CSS – Presentation of Information. Types of Style Sheets External Embedded h1{color:red; font-family: Arial;} Inline Text is here.
Web Design I Spring 2009 Kevin Cole Gallaudet University
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
CSS Basic (cascading style sheets)
CSS Cascading Style Sheets. CSS Advantages Greater typography and page layout control Style is separate from structure Styles can be stored in a separate.
CSS PREPROCESSORS Michael and Miles. Overview What are CSS Preprocessors Why use them? What is LESS and how to use LESS example What is SASS and how to.
SASS & LESS Syntactically Awesome StyleSheets Dynamic StyleSheet Language Svetlin Nakov Technical Trainer Software University
1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015.
Introduction to CSS. Why CSS? CSS Provides Efficiency in Design and Updates CSS relatively easy to use Can give you more flexibility and control Faster.
 HTML, CSS, JavaScript – enormously successful  SASS has all the tools we need! INTRO.
Intro to CSS Christy. What is CSS?  Cascading Style Sheets  Separates content from presentation  Defines how to display HTML elements  Provides control.
Martin Kruliš by Martin Kruliš (v1.0)1.
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
An empirical study on the use of CSS Preprocessors Davood Mazinanian Nikolaos Tsantalis Department of Computer Science and Software Engineering Concordia.
WEB FOUNDATIONS CSS Overview. Outline  What is CSS  What does it do  Where are styles stored  Why use them  What is the cascade effect  CSS Syntax.
CSS.
Introduction to CSS Layout
Migrating CSS to Preprocessors by Introducing Mixins
Style Sheets.
4.01 Cascading Style Sheets
Advanced Web Page Styling
Creating Page Layouts with CSS
Web Developer & Design Foundations with XHTML
THEAMING WITH SASS Bringing sassy to CSS SITRA.
Cascading Style Sheets
Introduction to Web programming
>> CSS Layouts.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Introduction to Web programming
Float Property Elements that seem to “float" on the right or left side of either the browser window or another element are often configured using.
Web Programming– UFCFB Lecture 11
What are Cascading Stylesheets (CSS)?
The Internet 10/6/11 Cascading Style Sheets
Web Development & Design Foundations with H T M L 5
How to use the CSS box model for spacing, borders, and backgrounds
Training & Development
Tutorial 3 Working with Cascading Style Sheets
CSS Styles Introduction.
CSS.
4.01 Cascading Style Sheets
Session IV Chapter 20 - How to use SASS and Less
Session IV Chapter 15 - How Work with Fonts and Printing
Presentation transcript:

Simple theme creation using Sass Geoff Barlow DnnConsulting.net Info@dnnconsulting.nl

cmsXpress internet solutions Dnn MVP 2014 - 2015 Creators of: Who am I? Geoff Barlow DnnConsulting.net cmsXpress internet solutions Dnn MVP 2014 - 2015 Creators of: The DnnBootster theme The DnnMDesign theme The DnnMinimalist theme The DnnContra theme (Bootstrap 4 beta) The DnnThemeEditor SkinObject www.DnnConsulting.net

Introduction What is Sass Why would I use Sass What is needed to use Sass A quick overview of Sass functions Setup of a Sass theme

Css with superpowers What is Sass? Sass stands for ‘Syntactically Awesome Style Sheets’ Sass is a scripting language that extends Css Sass is a Css preprocessor Sass uses language extensions such as variable, nested rules & mixins Sass is compatible with all versions of Css Css with superpowers

Css with superpowers Why would I use Sass? Super easy to learn Sass helps to write maintainable Css easier You get more done with less code Easier to change colors, fonts, widths and other Css settings Most Css frameworks, like Bootstrap & Zurb Foundation now use Sass as source Css with superpowers

Css with superpowers What will you need? A Css editor to editor your Sass files A way to compile your Sass: Command line compiler UI app to compile: Koala http://koala-app.com Scout http://scout-app.io Prepros https://prepros.io Css with superpowers

Quick overview of Sass functions Variables Nesting Mixins Extend/Inheritance Operators A Sass file has the extension of ‘.scss’ Css with superpowers

Css with superpowers Sass variables Variables allow you to store things like color, font families or any other CSS values you want to reuse. Sass uses the ‘$’ symbol to make something a variable. SCSS syntax: $font-family: Helvetica, sans-serif !default; $font-size: 14px !default; $primary-color: #333 !default;   body { font-family: $font-family; font-size: $font-size; color: $primary-color; } Css with superpowers

Css with superpowers Sass variables Variables allow you to store things like color, font families or any other CSS values you want to reuse. Sass uses the ‘$’ symbol to make something a variable. SCSS syntax: Css result: $font-family: Helvetica, sans-serif !default; $font-size: 14px !default; $primary-color: #333 !default;   body { font-family: $font-family; font-size: $font-size; color: $primary-color; } body { font-family: Helvetica, sans-serif; font-size: 14px; color: #333; } Css with superpowers

Css with superpowers Sass nesting It is possible to nest CSS classes with SASS. This allows you to write less code, easier to read and understand and save time. SCSS syntax: .container { width: 100%; h1 { color: red; } Css with superpowers

Css with superpowers Sass nesting It is possible to nest CSS classes with SASS. This allows you to write less code, easier to read and understand and save time. SCSS syntax: Css result: .container { width: 100%; h1 { color: red; } .container { width: 100%; } .container h1 { color: red; } Css with superpowers

Css with superpowers Sass Mixins Sass mixins are re-usable code snippets to save time when coding your Css. It is also possible to pass values to the mixins To make them more flexible. SCSS syntax: @mixin border-radius($radius) { -webkit-border-radius: $radius; -moz-border-radius: $radius; -ms-border-radius: $radius; border-radius: $radius; } .box { @include border-radius(10px); } Css with superpowers

Css with superpowers Sass Mixins Sass mixins are re-usable code snippets to save time when coding your Css. It is also possible to pass values to the mixins To make them more flexible. SCSS syntax: Css result: @mixin border-radius($radius) { -webkit-border-radius: $radius; -moz-border-radius: $radius; -ms-border-radius: $radius; border-radius: $radius; } .box { @include border-radius(10px); } .box { -webkit-border-radius: 10px; -moz-border-radius: 10px; -ms-border-radius: 10px; border-radius: 10px; } Css with superpowers

Css with superpowers Extend/Inheritance Using the Sass @extend lets share a set of Css properties from one selector to another and helps to keeps Sass very DRY. SCSS syntax: .message { border: 1px solid #ccc; padding: 10px; color: #333; } .success { @extend .message; border-color: green; Css with superpowers

Css with superpowers Extend/Inheritance Using the Sass @extend lets share a set of Css properties from one selector to another and helps to keeps Sass very DRY. SCSS syntax: Css result: .message { border: 1px solid #ccc; padding: 10px; color: #333; } .success { @extend .message; border-color: green; .message, .success { border: 1px solid #ccc; padding: 10px; color: #333; } .success { border-color: green; Css with superpowers

Css with superpowers Sass Operators Being able to do basic math in your Css is very helpful. Sass has a handful of operators like +, -, *, / and % you can use. SCSS syntax: .container { width: 100%; } article { float: left; width: 700px / 960px * 100%; } .sidebar { float: right; width: 200px / 960px * 100%; } Css with superpowers

Css with superpowers Sass Operators Being able to do basic math in your Css is very helpful. Sass has a handful of operators like +, -, *, / and % you can use. SCSS syntax: Css result: .container { width: 100%; } article { float: left; width: 700px / 960px * 100%; } .sidebar { float: right; width: 200px / 960px * 100%; } .container { width: 100%; } article { float: left; width: 72.91667%; } .sidebar { float: right; width: 20.83333%; } Css with superpowers

Creating A Sass theme in Dnn Setup of a Sass theme Creating A Sass theme in Dnn themes with superpowers

themes with superpowers Theme structure Theme name assets css js img sass bootstrap partials layouts navs themes with superpowers

themes with superpowers Theme structure Theme name sass assets bootstrap css Bootstrap Sass source files partials js img All partial files for the theme sass _bootstrap_variables.scss bootstrap _mixins.scss _style.scss partials _variables.scss layouts app.scss navs themes with superpowers

themes with superpowers Information & links DnnConsulting Skeleton Dnn theme source https://github.com/dnnconsulting/DnnC.Dnn-Connect-2017-Sass-Theme Sass resources http://sass-lang.com http://thesassway.com https://scotch.io/tutorials/getting-started-with-sass UI Apps Prepors : https://prepros.io Koala : http://koala-app.com Scout : http://scout-app.io Sass Frameworks Bootstrap 3 : http://getbootstrap.com/getting-started Bootstrap 4 : https://v4-alpha.getbootstrap.com/getting-started/download Zurb Foundation : http://foundation.zurb.com/sites/getting-started.html http://foundation.zurb.com/sites/getting-started.html MaterializeCss : http://materializecss.com/getting-started.html themes with superpowers