From 6d0a1f391decbf216c7cc84e7772919b71d3b825 Mon Sep 17 00:00:00 2001
From: Pam Hiett Rather than copy/pasting all their docs here, We're just going to focus on a few
- key things and the things we do different. Go Read the bootstrap docs to see what you can do. Since our interface is resizable you can only use a fluid grid. we just have the default bootstrap fluid grid. see their docs for more info. Use span 2 span 2 span 8 Media queries allow for custom CSS based on a number of conditions—ratios, widths, display type, etc—but usually focuses around Use media queries responsibly and only as a start to your mobile audiences. For larger projects, do consider dedicated code bases and not layers of media queries. For faster mobile-friendly development, use these utility classes for showing and hiding content by device. Below is a table of the available classes and their effect on a given media query layout (labeled by device). Resize your browser or load on different devices to test the above classes. Green checkmarks indicate that class is visible in your current viewport. Here, green checkmarks indicate that class is hidden in your current viewport. The The borders aren't defined because border logic varies so much between designs. Use the border classes to define them.
- The first element of a this content box is a
- It also has the classes We've added Image blocks float an image (or any content) to the left and keep the content from wrapping beneath it. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. This is an example of using here is what the code should look like: The "icon-" classes below can only be added to the semantically neutral "i" element. The one exception is text links, to which you can apply the icon class directly (see below for more details). you can use the same icon classes to add an icon to a plain link. Just add the
- examples:
- TONZ more docs about forms can be found on the bootstrap docs Bootstrap provides simple markup and styles for four styles of common web forms. Smart and lightweight defaults without extra markup. Add Add This is the main type of form that we use in canvas Given the above example form layout, here's the markup associated with the first input and control group. The Make any This page demonstrates all available components of our jQuery UI port.
- Hey! Sample ui-state-highlight style.Page Action List
-
-
-
-
-<% end %>
-
-
-.page-action-list
Canvas uses bootstrap!
- There are a few parts of boostrap we dont use and here's why:
-
-
-
-
-
-
-
-
- Bootstrap File
- Reason
-
-
- navbar
- We just don't use them yet. no reason we couldn't. They're commented out to just so we transfer less css over the wire. If you want them just uncomment it in app/stylesheets/bootstrap_parts/_main.scss
-
-
- pager
-
-
- sprites (aka glyphicons)
- We do our own font based icons.
-
-
- button-groups
-
- We use jqueryUI buttonsets instead.
- They are more accessible (because they use aria stuff and are built on top of native checkbox and radios)
-
-
-
- modals
- Use jqueryUI .dialog instead.
-
-
- popovers
- You can have popovers that look exactly like bootstrap ones, ours are just built off jqueryUI tooltips. see below.
-
-
- progress-bars
- Use jqueryUI progressbarsinstead, they have aria stuff that reads back to the screenreader their progress.
-
-
-
- accordion
- Use jqueryUI instead.
-
- Responsive design Grid Resize this page to see it in action
- .spanX
to have an element span 'X' number of columns.min-width
and max-width
.
-
- Responsive utility classes
-
-
-
-
-
-
-
-
- Class
- Phones 767px and below
- Tablets 979px to 768px
- Desktops Default
-
-
-
- .visible-phone
Visible
- Hidden
- Hidden
-
-
-
- .visible-tablet
Hidden
- Visible
- Hidden
-
-
-
- .visible-desktop
Hidden
- Hidden
- Visible
-
-
-
- .hidden-phone
Hidden
- Visible
- Visible
-
-
-
- .hidden-tablet
Visible
- Hidden
- Visible
-
-
-
-
- .hidden-desktop
Visible
- Visible
- Hidden
- Responsive utilities test case
- Visible on...
-
-
- Hidden on...
-
- Components we've made
-
- Content Box
- content-box
doesn't do much on its own, sets a background color and some padding for direct children.Content Box with Toolbar
- .toolbar
.
- border border-trbl border-round
to make the borders.
- List View
-
-
-
- <% 20.times do |i| %>
-
- Vertical Gutter
- v-gutter
and v-gutter-large
classes to add some vertical margin to an element equal to the grid's gutters (and * 1.5 for large).ImageBlock
-
-
Admin Links testing
- .admin-links
- <div class="admin-link-hover-area">
- <div class="admin-links">
- <button class="al-trigger ui-button"><span class="al-trigger-inner">Manage (will be accessibly hidden)</span></button>
- <ul class="al-options">
- <li><a href="#"><span class="ui-icon ui-icon-pencil"></span>Edit</a></li>
- <li><a href="#"><span class="ui-icon ui-icon-trash"></span>Delete (from database)</a></li>
- <li><a href="#"><span class="ui-icon ui-icon-trash"></span>Hide from this screen</a></li>
- <li><a href="#">an option with no icon</a></li>
- </ul>
- </div>
- put all of the content here
- </div>
-
- Icons
- icons on
- <a>
sicon-<whatever>
class to the <a>
- Do this <a class="icon-add" href="#"></a>
-
- NOT this <a href="#"><i class="icon-add"></i></a> <-- DONT USE THIS CODE
-
- Forms
-
-
-
-
-
-
-
-
-
- Name
- Class
- Description
-
-
- Vertical (default)
-
- .form-vertical
(not required)Stacked, left-aligned labels over controls
-
-
- Inline
-
- .form-inline
Left-aligned label and inline-block controls for compact style
-
-
- Search
-
- .form-search
Extra-rounded text input for a typical search aesthetic
-
-
-
- Horizontal
-
- .form-horizontal
Float left, right-aligned labels on same line as controls
- Example forms using just form controls, no extra markup
- Basic form
-
- <form class="well bootstrap-form">
- <label>Label name</label>
- <input type="text" class="span3" placeholder="Type something…">
- <span class="help-block">Example block-level help text here.</span>
- <label class="checkbox">
- <input type="checkbox"> Check me out
- </label>
- <button type="submit" class="btn">Submit</button>
- </form>
-
- Search form
- .form-search
to the form and .search-query
to the input
.
- <form class="well form-search">
- <input type="text" class="input-medium search-query">
- <button type="submit" class="btn">Search</button>
- </form>
-
-
- Inline form
- .form-inline
to finesse the vertical alignment and spacing of form controls.
- <form class="well form-inline">
- <input type="text" class="input-small" placeholder="Email">
- <input type="password" class="input-small" placeholder="Password">
- <label class="checkbox">
- <input type="checkbox"> Remember me
- </label>
- <button type="submit" class="btn">Sign in</button>
- </form>
-
- Horizontal forms
- Example markup
- .control-group
, .control-label
, and .controls
classes are all required for styling.
- <form class="form-horizontal">
- <fieldset>
- <legend>Legend text</legend>
- <div class="control-group">
- <label class="control-label" for="input01">Text input</label>
- <div class="controls">
- <input type="text" class="input-xlarge" id="input01">
- <p class="help-block">Supporting help text</p>
- </div>
- </div>
- </fieldset>
- </form>
-
-
- Block level inputs
- <input>
or <textarea>
element behave like a block level element.
-
- jQuery UI
- Highlight / Error
-
Ruh-roh: Sample ui-state-warning style.
-- Alert: Sample ui-state-error style.
-Ohai: Sample ui-state-success style.
-- Hello: Sample ui-state-default style.
-
- Heads up! Don't use .ui-button
in your code
- it still exists just because of the jqueryUI components that generate them as part of their markup.
- This is just to make sure I didn't break that.
-
- <A href="#"> .ui-button - - a.btn -
- -- - - - - -
- -- - - - - -
- - -To add an icon to a button, simply add an i element within the element with the .btn class. (Please note that icons will be suppressed when added to a button with the btn-mini class because they'd look so small as to be illegible at that size.)
-
-
- button class="btn" --> i class="icon-stats"
-
-
- - - - - - -
- - -- Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer - ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit - amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut - odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate. -
-- Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet - purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor - velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In - suscipit faucibus urna. -
-- Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. - Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero - ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis - lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. -
-- Cras dictum. Pellentesque habitant morbi tristique senectus et netus - et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in - faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia - mauris vel est. -
-- Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. - Class aptent taciti sociosqu ad litora torquent per conubia nostra, per - inceptos himenaeos. -
-.ui-tabs-minimal
-
- Animate to random number - - -- DON'T USE Jquery UI Icons - Use one of the font based icons above. this is just to make sure we don't break - backward compatibility. -
- - - -"tooltipClass":"popover"
to the data-tooltip
attribute