Upstate CSS Guide
The following are key css classes found in the global-rwd.css stylesheet. We use classes for consistancy and because Cascade removes styles in WYSIWYGs. Some classes are available for all Cascade users via the "Formats" dropdown or automatically added using a Content or Multimedia block, but most are only available to advanced users.
Colors
css class | example | details | |
color1 / bg1 text-blue / text_blue bg-blue / bg_blue intro-text / intro_text |
EXAMPLE | EXAMPLE | #33678c uses: h2, h3, intro-text, box-link, table-head, feed-date, global-menu accordions, captions, quicklinks, tabs |
color2 / bg2 | EXAMPLE | EXAMPLE | #8f9380 uses: quick-links-menu header |
color3 / bg3 | EXAMPLE | EXAMPLE | #8e3c8b uses: gch |
color4 / bg4 | EXAMPLE | EXAMPLE | #fae478 uses: gch |
color5 / bg5 color7 / bg7 text-lightblue / text_lightblue bg-lightblue / bg_lightblue |
EXAMPLE | EXAMPLE | #e6f5ff uses: site-title |
color6 / bg6 | EXAMPLE | #e3e5c0 uses: breadcrumb, menu highlighting |
|
text-black / text_black bg-black / bg_black |
EXAMPLE | EXAMPLE | #000 |
text-white / text_white bg-white / bg_white |
EXAMPLE | EXAMPLE | #fff uses: background |
text-red / text_red bg-red / bg_red |
EXAMPLE | EXAMPLE | #f00 Uses: emergency stuff, form errors |
text-gray / text_gray bg-gray/ bg_gray |
EXAMPLE | EXAMPLE | #666 Uses: left-menu text |
text-lightgray, text_lightgray bg-lightgray, bg_lightgray |
EXAMPLE | EXAMPLE | #efefef uses: newsfeed-item hover |
text-darkgray / text_darkgray bg-darkgray / bg_darkgray |
EXAMPLE | EXAMPLE | #363636 |
text-green / text_green | EXAMPLE | #008000 (text only) |
Other colors not css class accessable:
uses | color | example |
body | #181a0f text, #fff | EXAMPLE |
header | #18264e background | EXAMPLE |
h1 | #18264e text |
Example |
footer | #d6d6c9 background, #333 text | EXAMPLE |
last-modified | #d6d6c9 background, #666 text | EXAMPLE |
boxlink, quick-links-buttons pre-hover state |
#76b2d9 background, #fff text |
EXAMPLE
|
Text and Fonts
intro_text, intro-text
bold: bold, box-title, box_title, or just use <strong> or <b>
italic: italic or use <i>
underline: don't use it.
allcaps: allcaps
size75, size80, size85, size95 (others removed in RWD)
<h1>h1. Bootstrap heading <small>Secondary text</small></h1>
<h2>h2. Bootstrap heading <small>Secondary text</small></h2>
<h3>h3. Bootstrap heading Secondary text</small></h3>
<h4>h4. Bootstrap heading <small>Secondary text</small></h4>
<h5>h5. Bootstrap heading <small>Secondary text</small></h5>
<h6>h6. Bootstrap heading <small>Secondary text</small></h6>
<p class="indent">
<p class="lead">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.</p>
You can use the mark tag to highlight text.
<p>You can use the mark tag to <mark>highlight</mark> text.</p>
Left aligned text.
<p class="text-left">Left aligned text.</p>
Center aligned text.
<p class="text-center">Center aligned text.</p>
Right aligned text.
<p class="text-right">Right aligned text.</p>
Justified text... Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sed arcu quis orci convallis sollicitudin. Donec tincidunt ante id maximus eleifend. Suspendisse eu quam pulvinar, rhoncus augue eu, euismod nibh. Mauris dui tellus, aliquet eu rutrum sed, feugiat tristique mauris. Aenean fermentum mi eget nisl tincidunt, nec commodo lacus fringilla. Vestibulum tortor nunc, rutrum a pretium ac, malesuada quis erat. Quisque vehicula nec neque nec sollicitudin.
<p class="text-justify">Justified text.</p>
No wrap text... Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sed arcu quis orci convallis sollicitudin. Donec tincidunt ante id maximus eleifend. Suspendisse eu quam pulvinar, rhoncus augue eu, euismod nibh. Mauris dui tellus, aliquet eu rutrum sed, feugiat tristique mauris. Aenean fermentum mi eget nisl tincidunt, nec commodo lacus fringilla. Vestibulum tortor nunc, rutrum a pretium ac, malesuada quis erat. Quisque vehicula nec neque nec sollicitudin.
<p class="text-nowrap">No wrap text.</p>Twitter, Inc.
795 Folsom Ave, Suite 600
San Francisco, CA 94107
P: (123) 456-7890
<address> <strong>Twitter, Inc.</strong><br> 795 Folsom Ave, Suite 600<br> San Francisco, CA 94107<br> <abbr title="Phone">P:</abbr> (123) 456-7890 </address>
Font Family classes
- arial
No specific CSS code for below, but for reference:
- regular (body): font-family:opensansr,verdana,arial,sans-serif !important;
- light: font-family:opensansl,arial,sans-serif
- bold: font-family:opensansb,arial,sans-serif;
Links
- Normal link
- Class: nounderline
- Class: underline-on-hover
- Class: link (just like normal link)
- <--external link
quick-links-buttons (if possible, use quick-links in the Content Megablock)
<div class="quick-links-buttons">
<div class="links-content">
<ul>
<li><a href="education/emstat/ems-feedback.php">EMS Feedback</a></li>
</ul>
</div>
</div>
boxlink (note: do not use in a WYSIWYG, link is stripped when submitted)
<a class="boxlink" href="https://www.upstate.edu/upstateconnect/appointment.php"> <div class="boxlink">Request Appointment </div>
</a>
Margins and Padding
px | padding | margin |
0 | nopadding | nomargin |
1 | pad1 | |
2 | pad2 | |
3 | pad3, padtop3, padbottom3, padleft5, padright3 |
margintop3, marginbottom3, marginleft3, marginright3 |
4 | pad4 | |
5 | pad5, padtop5, padbottom5, padleft5, padright5 |
margintop5, marginbottom5, marginleft5, marginright5 |
6 | pad6 | |
7 | pad7, padtop7, padbottom7, padleft7, padright7 |
margintop7, marginbottom7, marginleft7, marginright7 |
8 | pad8 | |
9 | pad9, padtop9, padbottom9, padleft9, padright9 |
margintop9, marginbottom9, marginleft9, marginright9 |
10 | pad10 |
Width and Heights
Width
Percentages:
width10, width15, width20, width25, width30, width35, width40, width45, width50, width55, width60, width65, width70, width75, width80, width85, width90, width95, width100
Pixels:
width5px, width10px, width15px.... width1200px
max-width5, max-width10, max-width15.... max-width1000
Auto:
width-auto / width_auto
Mixed:
min200px_max50_left ({min-width:200px;max-width:50%;float:left;margin-right:10px})
Height (pixel-only):
Pixels:
min-height100, min-height105, min-height110 ... min-height500
Auto:
height-auto / height_auto
Line Height (percentages)
lheight80, lheight90, lheight95, lheight120, lheight125, lheight150, lheight200
Bootstrap Columns
col naming convention: 96 combinations | ||||
col | - | lg | - | 1 |
- | md | - | 2 | |
- | sm | - | 3 | |
- | xs | - | 4 | |
- | 2xs | - | 5 | |
- | 3xs | - | 6 | |
- | 4xs | - | 7 | |
- | 5xs | - | 8 | |
- | 9 | |||
- | 10 | |||
- | 11 | |||
- | 12 |
12-based Percentages
pixels are of media size, not container size
Floats and alignment
centerobject, aligncenter, center, centertable
leftobject, alignleft
rightobject, alignobject
RWD only:
col-sm-push-4 (any number 1-12), pull-left
col-sm-pull-4 (any number 1-12), pull-right
col-sm-offset-4 (any number 1-12)
Borders, Corners, Shadows
Borders
solid1, solid2, solid3, solid4
borderleft1, borderleft2
borderright1, borderright2
borderbottom1, borderbottom2
noborder
Corners
round5, round7, round9
roundtop5, roundtop7, roundtop9
roundbottom5, roundbottom7, roundbottom9
Shadows
darkshadow3, darkshadow5
mediumshadow3, mediumshadow5
lightshadow 3, lightshadow5
Display, Clear, Horizontal Rule
Display
block, inline-block, inline
hide, hidden (both set display to "none")
Clear
br.all (example: <br class="all" />)
clr, clearfix
Horizontal Rule
thin (1px), medium (2px), lightgray (eg. <hr class="thin color1 bg1 width80 center" />
Images
If possible, use the image block in the Multimedia Megablock.
- img-responsive - if image is big, shrinks to size of div
- width100 - if image is small, expands to size of div
- imagerollover - used for image links (also use hide-link-icon class in the <a> if it's an external link or file)
Example code:
<a class="hide-link-icon" href="healthcare/index.php">
<img alt="add image description" class="img-responsive imagerollover width100" src="images/example.jpg" />
</a>
Table
For simple tables, especially those which will be often updated, use the "simple-table" in the Content Megablock.
Working with tables, in detail, on the Cascade-Training site.
Classes to use:
- table table-striped table-upstate - add for <table> adds 1px border spacing, 3px padding for cells
- table-head - add for first row, center and bold white text, color1 background, 5px padding
Optional Classes:
- tvalignbottom, tvalignmiddle, tvaligntop - verticle alignment of text
- taligncenter, talignleft, talignright - horizontal alignment of text
- tcellpadding1 -> tcellpadding5 - add padding inside cell
- tcellspacing1 -> tcellspacing5 - add border spacing between cells
Example in code:
<table class="table table-striped table-upstate" summary="Table example" border="0">
<tbody>
<tr class="table-head">
<td>Letters</td>
<td colspan="3">Examples</td>
</tr>
<tr>
<td>A</td>
<td>Albert Einstein</td>
<td>Alabama</td>
<td>Alligators</td>
</tr>
<tr>
<td>B</td>
<td>Beethoven</td>
<td>Botswana</td>
<td>Batteries</td>
</tr>
<tr>
<td>C</td>
<td>Charles Schultz</td>
<td>California</td>
<td>Classrooms</td>
</tr>
<tr>
<td>D</td>
<td>Don Knots</td>
<td>Denmark</td>
<td>Desks</td>
</tr>
<tr>
<td>E</td>
<td>Ella Fitzgerald</td>
<td>Europe</td>
<td>Ears</td>
</tr>
</tbody>
</table>
Example result:
Letters | Examples | ||
A | Albert Einstein | Alabama | Alligators |
B | Beethoven | Botswana | Batteries |
C | Charles Schultz | California | Classrooms |
D | Don Knots | Denmark | Desks |
E | Ella Fitzgerald | Europe | Ears |
Accordions
If possible, use the accordion block in the Content Megablock.
Accordion code example:
<a href="#" id="expand_all">Expand all</a>
<div class="accordion">
<h2>Blah Blah Blah</h2>
<div>Hidden text goes here</div>
</div>