1. BOOTSTRAP CSS
– EM BaseTheme is based on Bootstrap front-end framework with custom grid system 24 columns. For more information http://getbootstrap.com/. Basic usage:
Containers:
- Bootstrap requires a containing element to wrap site contents and house our grid system. You may choose one of two containers to use in your projects. Note that, due to padding and more, neither container is nestable.
- Use .container for a responsive fixed width container.
- Use .container-fluid for a full width container, spanning the entire width of your viewport
Grid System – http://getbootstrap.com/css/#grid-example-fluid
- Rows must be placed within a .container (fixed-width) or .container-fluid (full-width) for proper alignment and padding.
- Use rows to create horizontal groups of columns.
- Content should be placed within columns, and only columns may be immediate children of rows.
- Predefined grid classes like .row and .col-xs-4 are available for quickly making grid layouts. Less mixins can also be used for more semantic layouts.
- Columns create gutters (gaps between column content) via padding. That padding is offset in rows for the first and last column via negative margin on .row.
- The negative margin is the reason why the examples below are outdented. Thus, content in grid columns is lined up with non-grid content.
- Grid columns are created by specifying the number of twelve available columns you wish to span. For example, three equal columns use three .col-xs-4.
- Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override grid classes targeted at smaller devices. Therefore, applying any .col-md-class to an element will not only affect its styling on medium devices but also on large devices if a .col-lg- class is not present.
- See how aspects of the Bootstrap grid system work across multiple devices with a handy table.
Example
Typography – http://getbootstrap.com/css/#type
- Alignment classes: Easily realign text to components with text alignment classes.
Left aligned text.
Center aligned text.
Right aligned text.
Justified text.
No wrap text.
- Transformation classes: Transform text in components with text capitalization classes.
Lowercased text.
Uppercased text.
Capitalized text.
Code – http://getbootstrap.com/css/#code
Tables – http://getbootstrap.com/css/#tables
Responsive tables: Create responsive tables by wrapping any .table in .table-responsive to make them scroll horizontally on small devices (under 768px). When viewing on any screen larger than 768px wide, you will not see any difference in these tables. Example
Forms – http://getbootstrap.com/css/#forms
Buttons – http://getbootstrap.com/css/#buttons
Images – http://getbootstrap.com/css/#images
- Images in Bootstrap 3 can be made responsive-friendly via the addition of the
.img-responsive
class. This appliesmax-width: 100%;
andheight: auto;
to the image so that it scales nicely to the parent element. - Add classes to an
element to easily style images in any project. Cross-browser compatibility: keep in mind that Internet Explorer 8 lacks support for rounded corners
Helper classes – http://getbootstrap.com/css/#helper-classes
- Quick floats: Float an element to the left or right with a class.!important is included to avoid specificity issues. Classes can also be used as mixins....
... - Showing and hiding content: Force an element to be shown or hidden (including for screen readers) with the use of
.show
and.hidden
classes. These classes use !important to avoid specificity conflicts, just like the quick floats. They are only available for block level toggling. They can also be used as mixins..hide
is available, but it does not always affect screen readers and is deprecated as of v3.0.1. Use.hidden
or.sr-only
instead. Furthermore,.invisible
can be used to toggle only the visibility of an element, meaning its display is not modified and the element can still affect the flow of the document....
...
Responsive utilities: For faster mobile-friendly development, use these utility classes for showing and hiding content by device via media query. Also included are utility classes for toggling content when printed.
2. LESS CSS
EM BaseTheme is based on Less front-end framework: http://lesscss.org/ To start creating your own styles, lets create a mycustom.less inside skin/frontend/default/embasetheme/css/. Go to backend, EMThemes > EM BaseTheme Settings, in section Theme Design > CSS tab, enter value mycustom.less in field Additional CSS File(s) To access these variables in your custom css file mycustom.less, use syntax below: css-selector { css-attribute:@variable; } or css-selector { mixin(@variable); } – Example body{ .changeAllColor(@body_text2_color; @body_bg_color); .changeFont(@general_font); }There are some variables of the variations that you can access inside your custom css:
- @screen-large-desktop
- @screen-desktop
- @screen-tablet
- @desktop
- @tablet
- @page_bg_color
- @page_bg_position
- @page_bg_repeat
- @page_bg_attachment
- @box_shadow
- @rounded_corner
- @general_font
- @h1_font
- @h2_font
- @h3_font
- @h4_font
- @h5_font
- @h6_font
- @header_bg_color
- @header_bg2_color
- @header_bg3_color
- @header_bg4_color
- @header_bg5_color
- @header_bg_position
- @header_bg_repeat
- @header_text_color
- @header_text2_color
- @header_text3_color
- @header_line_color
- @topmenu_bg_color
- @topmenu_hover_bg_color
- @topmenu_text_color
- @topmenu_hover_text_color
- @topmenu_line_color
- @topmenu_font
- @vnav_bg_color
- @vnav_hover_bg_color
- @vnav_text_color
- @vnav_hover_text_color
- @vnav_line_color
- @vnav_font
- @dropmenu_bg_color
- @dropmenu_text_color
- @dropmenu_text2_color
- @dropmenu_text3_color
- @dropmenu_line_color
- @dropmenu_font
- @body_bg_color
- @body_bg2_color
- @body_bg3_color
- @body_bg4_color
- @body_bg5_color
- @body_bg6_color
- @body_bg_position
- @body_bg_repeat
- @body_text_color
- @body_text2_color
- @body_text3_color
- @body_text4_color
- @body_text5_color
- @body_text6_color
- @body_text7_color
- @body_text8_color
- @body_line_color
- @body_line2_color
- @footer_bg_color
- @footer_bg_position
- @footer_bg_repeat
- @footer_text_color
- @footer_text2_color
- @footer_text3_color
- @footer_line_color
- @btn1_bg_color
- @btn1_text_color
- @btn1_line_color
- @btn1_font
- @btn2_bg_color
- @btn2_text_color
- @btn2_line_color
- @btn2_font
- @btn3_bg_color
- @btn3_text_color
- @btn3_line_color
- @btn3_font
- @btn4_bg_color
- @btn4_text_color
- @btn4_line_color
- @btn4_font
3. FONT AWESOME CSS
You can learn more about Font Awesome CSS here: http://fortawesome.github.io/Font-Awesome/