We use two files as the source for our main CSS classes and styles. There is a Main.css file which is the same across all sites, and a over ride file named Main_{site}.css for site specific variations.
The concept is simply to have a slam-able set of CSS styles, and a way to over rides these styles to customize the look of a site. The Main.css file is slam-able between websites and themes everything in monotone gray colors. If a retailer wants custom colors or other custom styling, you can write a CSS rule in the Main_{site}.css file. Because the Main_{site}.css file is included after the Main.css file, any rule set with the same selector found in the two files, the changes made in the Main_{site}.css file will take precedence.
The CSS files are found on the graphics server of each site to take advantage of the CDN.
Section names are the same as those in main.css
For more information visit the Template Guide page.
Generally speaking you won't have to think about template rules since the framework takes care of it for you. So we won't go into much detail here, but will mention that the following classes are assigned to the Template.inc file to manage layout.
We have created a basic set of CSS classes used to achieve consistent effects for commonly used elements. Most of the rules you will be using are found in this section.
This creates pretty bread crumb navigation.
For more information visit the Breadcrumb Guide.
The breadcrumb guide explains a standard approach to creating breadcrumbs in modules and web pages.
<ul class="Breadcrumb"> <li class="Home"><a href="http://www.pricechopper.com/"><span>Home</span></a></li> <li ><a href="http://www.pricechopper.com/Recipes/Index/">Recipes</a></li> <li ><a href="http://www.pricechopper.com/Recipes/Weekly/">Weekly</a></li> <li class="Last"><a href="http://www.pricechopper.com/Recipes/Detail/158/Fudge_Sundae_Pie/">Fudge Sundae Pie</a></li> </ul>
This makes lists of links attractive. Plays nice with .button class on links.
<div class="LinkList"> <ul> <li class="Home"><a href="http://www.pricechopper.com/"><span>Home</span></a></li> <li ><a href="http://www.pricechopper.com/Recipes/Index/">Recipes</a></li> <li ><a href="http://www.pricechopper.com/Recipes/Weekly/">Weekly</a></li> <li class="Last"> <a href="http://www.pricechopper.com/Recipes/Detail/158/Fudge_Sundae_Pie/"> Fudge Sundae Pie </a> </li> </ul> </div>
This makes pretty buttons. Examples below...
<p><a href="#" class="button">a.button</a></p>
<button>button</button>
This makes a pretty search form input
<form> <input type="text" placeholder="Search Recipes" autosave="com.webstop.recipe.search" class="InputSearch" name="Search" value="" results="10" size="25" title="Search Recipes" /> </form>
The .columnTopWrapper class allows you to keep search forms in the sidebar even height with breadcrumbs in the content section.
Seems like there ought to be a better way to do this, but this is what we have for now.
<div class="columnTopWrapper"> <form> <input type="text" placeholder="Search Recipes" autosave="com.webstop.recipe.search" class="InputSearch" name="Search" value="" results="10" size="25" title="Search Recipes" /> </form> </div>
This is a special class designed to style links above and below a hit list of data.
This CSS class is meant to be used with the HitList_Pagination custom tag, and isn't likely to be used without it.
<div class="Pagination Bottom"> <p> <span class="ViewingStats">Viewing 21-40 of 49 recipes.</span> <span class="PageStats">Page 2 of 3.</span> </p> <ul> <li class="SkipFirst"> <a href="http://www.pricechopper.com/Recipes/Recent/0/"><span><<<span class="word">First</span></span></a> </li> <li class="SkipPrev"> <a href="http://www.pricechopper.com/Recipes/Recent/0/"><span><<span class="word">Prev</span></span></a> </li> <li class="PrevPages"><a href="http://www.pricechopper.com/Recipes/Recent/0/"><span>1</span></a></li> <li class="CurrentPage"><span>2</span></li> <li class="NextPages"><a href="http://www.pricechopper.com/Recipes/Recent/40/"><span>3</span></a></li> <li class="SkipNext"> <a href="http://www.pricechopper.com/Recipes/Recent/40/"><span><span class="word">Next</span>></span></a> </li> <li class="SkipLast"> <a href="http://www.pricechopper.com/Recipes/Recent/40/"><span><span class="word">Last</span>>></span></a> </li> </ul> </div>
This makes a pretty "Add to Shopping List" button.
<p><a href="#" class="button AddToList">a.AddToList.button</a></p>
<button>button.AddToList</button>
Styles an attractive login form.
<div class="LoginReq"> <h2>Login Required</h2> <p>My Cookbook recipes are saved under your AdvantEdge Card account.</p> <p><a href="http://www.pricechoper.com/Card_mod/Card_Login_Stub.las" class="button">Login</a></p> <p> <strong>Please <a href="http://www.pricechopper.com/Card_mod/Card_Login_Stub.las">login</a> to access My Cookbook recipes.</strong> </p> </div>
My Cookbook recipes are saved under your AdvantEdge Card account.
Please login to access My Cookbook recipes.
.message .confirm .error .information .status
The .message class has the following sub classes: .confirm, .error, .information, .status, . The sub classes determine colors and icons to be used in each message.
<div class="message confirm"> <h4 class="title">Main Confirm Message <span>sub message</span></h4> <p class="note">Note about the confirmation (optional)</p> </div>
.confirm .note
.error .note
.information .note
.status .note
Place the .PrintOnly class on elements you only want to show up when the page is printed, and have hidden on the computer screen.
<p class="PrintOnly">Source: http://pricechopper.com/Recipes/Weekly/</p>
Source: http://pricechopper.com/Recipes/Weekly/
Place the .Group class on elements you want to stand out on a page.
<div class="Group"> <h4>My Stuff</h4> <p>Here is some stuff that belongs together, and I want to stand out on the page.</p> </div>
Placed on a white background to more accurately reflect how a page will look.
Here is some stuff that belongs together, and I want to stand out on the page.
We still need to migrate rules like .StandardChart, .HitList & etc. to the Main.css file.
Green Bar refers to an effect where data in rows is displayed with alternating colors between each record (row). Two classes are used to get the green bar effect: .OddRow and .EvenRow. They are usually accompanied by classes like .HitList which styles a whole table or ol/ul for attractive data display.
<ul> <li class="OddRow">Item 1</li> <li class="EvenRow">Item 2</li> <li class="OddRow">Item 3</li> <li class="EvenRow">Item 4</li> </ul>
[var('vRow'='OddRow')]
<ul>
[loop(4)]
<li class="[$vRow]">Item [loop_count]</li>
[$vRow == 'OddRow' ? $vRow = 'EvenRow' | $vRow = 'OddRow';]
[/loop]
</ul>
Rules that only work, or work differently inside the .SideBar class.
Place the .Group class on elements you want to stand out on a page.
<div class="SideBar"> <div class="Group LinkList RecipeLinks"> <h4 class="Title">Recipes</h4> <ul> <li><a href="http://pricechopper.com/Recipes/Weekly/" class="button">Weekly Recipes</a></li> <li><a href="http://pricechopper.com/Recipes/Categories/" class="button">Recipe Categories</a></li> <li><a href="http://pricechopper.com/Recipes/Recent/" class="button">Recently Viewed</a></li> <li><a href="http://pricechopper.com/Recipes/MyCookbook/" class="button">My Cookbook</a></li> </ul> </div> </div>