-2

I found a list of ALL bootstrap classes courtesy of a post here. Hooray. Except it is not complete. In the last 2 hours, in Stackoverflow, I have found examples of class="span4; clear:both; content-heading; paragraphs; " (these were not in a list)

What's div class="paragraphs" ? Is content-heading similar to .lead (which I think is a style).

Is there any listing of all the STYLES?

I love w3schools - I live 20 miles W of MIT, and MIT was one the schools that accepted me 50 years ago. I love the mission and execution of w3. But I have poured through their tutorials and references and I cannot find simple rules like:

  • class elements can be strung together, semi-colons in-between. They end in a quote mark, but the last entry can be followed by a semi-colon with or w/o a space. Numbers, like height, can have leading spaces.

Is there some place that lays out this stuff? I've looked at many other bootstrap sites, but w3 seems the best. I still don't quite grasp Github, but they have lots of info.

Rahil Wazir
  • 10,007
  • 11
  • 42
  • 64
Wood Loon
  • 25
  • 1
  • 4
  • I suggest going to bootstrap's homepage (not github), getting the latest release (3.3.4), taking a calming breath, and working through the tutorial. http://getbootstrap.com/getting-started/ – VictorySaber Apr 24 '15 at 13:18
  • Obviously you have a pretty good listing at the official site: http://getbootstrap.com/css/ – Mackan Apr 24 '15 at 13:18

2 Answers2

1

I would recommend you to have a look at the official bootstrap documentation

http://getbootstrap.com/ for the latest version http://getbootstrap.com/2.3.2/ for the older version

In the example you are looking, paragraphs and content-heading classes might be a user defined.

It is also worth noting that bootstrap evolved over time. Bootstrap 2x to 3x was a major change. So note that the examples you are looking at might correspond to an older version of bootstrap.

The release history can be found here on github https://github.com/twbs/bootstrap/releases

and Bootstrap 2x to 3x migration guide can be found here http://getbootstrap.com/migration/

Hope it helps

vma
  • 1,606
  • 13
  • 14
  • Vishi - you miss my point. I have not been able to find "rules" on punctuating class names, and similar issues. nikc.org, below, wrote out some, including the recommendation to enclose even single attribute values in quotes. It just seems there should be a good source for stuff like that. But thanks for your response. And I did check all the links. – Wood Loon Apr 24 '15 at 19:53
0

There is no such thing as a "class element". You can attach class names to HTML element nodes by listing them in the node's class attribute.

Multiple class names are separated by white space, the whole list of class names enclosed in quotes, single or double makes no difference. Example: <div class="first-class second-class"/>. A single class name does not require surrounding quotes, however it's advisable to always enclose attribute values in quotes, to avoid mistakingly omitting them when they are required. The order of class names in the attribute value is irrelevant.

A valid class name can consist of upper and lowercase letters, numbers, hyphens (-) and underbars (_). However the name must start with a letter, hyphen or underbar. See this more complete answer for more on this subject.

Styles for class names are defined in style sheets, for the web its CSS (Cascading Style Sheets). The cascade is defined by the order styles are introduced in the style sheet; succinctly and simplified: later values trump earlier values, when the selectors are of equal importance.

In CSS, properties and their value is separated by a colon. The value is followed by a semi-colon. A block of styles is surrounded in curly braces, and are preceded by a selector. The selector can be a tag name, id, class name as well as a combination of the three, combinators and pseudo-elements.

An example:

/* Styles applied to the body tag and all its child nodes */
body {
    background-color: white;
    color: black;
}

/* This block defines that when the class name "error"
 * applies, the text should be red */
.error {
    color: red;
}

For a friendly tutorial in HTML and CSS, see e.g. CodeAcademy. For reasons why one should not hold W3Schools in very high regard see W3Fools.com.

Community
  • 1
  • 1
nikc.org
  • 16,462
  • 6
  • 50
  • 83
  • 1
    Thanks much! I copied your answer into my bootstrap doc. I also gave the links a gander - Code Academy seems good for a starter, but I have not investigated if I can find specific subjects. w3fools is for much more advanced coders than me - their links took me to HTML Rocks (EVERY subject was high-end) and CSS Tricks. Too deep for what I am looking for. [That said, they've got me looking into GRUNT!] I've already found Bootply which has an easy "fiddle" panel setup. So, like I said, thanks. And you really helped on the "rules" on class names. – Wood Loon Apr 24 '15 at 19:46
  • @WoodLoon You're most welcome. Glad if I can help. If you want to return the favour, you can make my answer the accepted one, by ticking the checkmark to the left of the top of my answer. – nikc.org Apr 24 '15 at 21:28