Venddor IO employs LESS as its foundational structure for layout styles. LESS, a dynamic CSS preprocessor, extends CSS capabilities. Learn more about LESS and its diverse features at the official site: LESS Official Site.
In Venddor IO, only select LESS features are integrated. Below is a detailed description of these features and their significance.
Variables enable you to define and reuse specific values in multiple locations.
Example:
@price: #343434;
In Venddor IO, LESS variables correspond to the Styles concept. Within the design/themes/THEME_NAME/styles/data directory, LESS files contain variables tied to the Theme Editor.
These variable values can either be modified directly within the file or updated using the Theme Editor post style-saving.
Mixins facilitate the incorporation of all properties of one class into another, using the class name as a property value. This is akin to employing variables but pertains to entire classes.
Example:
rounded-corners (@radius: 5px) {
border-radius: @radius;
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
}
#header {
.rounded-corners;
}
#footer {
.rounded-corners(10px);
}
Venddor IO uses a collection of mixins from Bootstrap 2.3. They are housed in the mixins.less file located in the design/themes/responsive/css/tygh directory.
LESS allows arithmetic operations within rules, like addition, subtraction, multiplication, and division.
Example:
width: (900 / @columns)px;
LESS offers a myriad of functions: from color manipulation, mathematical functions to string operations.
Key functions in Venddor IO include:
lighten(@color, 10%): Lightens a color by 10%.darken(@color, 10%): Darkens a color by 10%.These functions often interact with Styles and the Theme Editor, allowing dynamic color adjustments based on a base color.
Nested rules allow for one rule to be enclosed within another. Venddor IO uses them sparingly to prevent complexities during development.
Your Venddor IO theme's CSS directory path is design/themes/THEME_NAME.
Within this:
css/addons: Contains styles for modules.css/lib: Houses external developer styles, including jQuery library styles.css/tygh: Contains auxiliary styles.The main file is styles.less, which comprises the theme's styles. Files housed in css/tygh are integrated into styles.less using the @import operator.
When it comes to including style files (both CSS and LESS), they're prioritized by:
design/themes/basic/templates/common/styles.tpl.design/themes/basic/templates/common/styles.tpl.design/themes/basic/templates/common/styles.tpl.Remember, while consolidating files into a single CSS reduces request numbers, it complicates pinpointing specific styles during development.