You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
4.3 KiB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
  1. # Semantic
  2. Semantic is a set of specifications for sharing UI elements between developers. Semantic is also a UI library to make front end development simpler and easier to learn.
  3. ## About
  4. Semantic's goal is to define a vocabulary for interface elements based on consensus, and convention.
  5. For developers, this means defining class names for UI elements, outlining states that an elements can exist, and describing common variations of that element.
  6. ### Download
  7. You can use our build tool to select only the components you want
  8. http://semantic-ui.com/download
  9. Or download the whole kit and kaboodle
  10. http://semantic-ui.com/ui/semantic.min.css
  11. http://semantic-ui.com/ui/semantic.min.js
  12. ## A More Semantic Web
  13. ### Based on class
  14. Semantic is based on class names, instead of tags. This means, except for links, tables and forms, you can use semantic with tags like ``<div> <article> <nav>`` without any difference.
  15. ### Context sensitive
  16. In Semantic, variations maintain context based on the element they modify, but keep the same vocabulary between elements. Just like how in English, the adjective 'big' may describe a different scale for a big planet versus a big insect.
  17. For example, a form you can have a variation called "inverted". This changes the appearance of form elements to work on dark backgrounds.
  18. ```html
  19. <div class="ui inverted form"></div>
  20. ```
  21. The same variation can also be useful in the context of a menu.
  22. ```html
  23. <div class="ui inverted menu"></div>
  24. ```
  25. ### Defining UI
  26. Here is part of Semantic's definition of a button
  27. **Standard**: A button is a shape that can be pressed in to complete an action.
  28. ```html
  29. <div class="ui button"></div>
  30. ```
  31. **State**: A button can sometimes be active, designating it is selected by the user.
  32. ```html
  33. <div class="ui active button">
  34. ```
  35. **Variations**: A button may sometimes look different than its prototype.
  36. ```html
  37. <div class="ui large blue icon button">
  38. <i class="ui icon heart"></i>
  39. </div>
  40. ```
  41. **Plurality**: A button can sometimes exist in a group of buttons
  42. ``` html
  43. <div class="ui large blue buttons">
  44. <div class="ui button">
  45. I am blue
  46. </div>
  47. <div class="ui button">
  48. I am blue too
  49. </div>
  50. </div>
  51. ```
  52. ## Types of UI
  53. UI components are split into four categories:
  54. * UI Elements
  55. * UI Collections
  56. * UI VIews
  57. * UI Modules
  58. All UI definitions are made of a neutral, ideal definition, a list of states it can occupy, and a set of common variations or "types" of that element.
  59. ### UI Elements
  60. UI Elements are interface elements which do not contain other elements inside themselves. This can be thought of as similar in definition as an "element" in chemistry.
  61. UI elements can have plural definitions when they are known to exist together frequently.
  62. In this case each button will be large because we understand it is a part of the large button group
  63. ``` html
  64. <div class="large buttons">
  65. <div class="ui button">Cancel</div>
  66. <div class="ui positive button">Continue</div>
  67. </div>
  68. ```
  69. Examples of UI elements:
  70. * Buttons
  71. * Labels
  72. * Headers
  73. * Progress bars
  74. ### UI Collections
  75. UI Collections are groups of heteregeneous UI elements which are usually found together. Carrying the chemistry metaphor, these can be thought of as molecules.
  76. UI collections have a definition of elements that exist, or could exist inside of them. They do not usually require all elements to be found, but they describe a list of the "usual suspects". Unlike elements, collections are not typically useful to define in plural.
  77. Examples of UI collections:
  78. * Forms
  79. * Tables
  80. * Grids (Layout)
  81. * Menus
  82. ## UI Views
  83. UI Views are common ways to display site content. Instead of providing a specific interaction, views structure content so that it can be understood more easily.
  84. Examples of UI views:
  85. ** Comment Feed
  86. ** Activity Feed
  87. ** Product List
  88. ## UI Modules
  89. UI modules are UI elements where it's behavior is a fundamental part of its definition. UI Modules are dependent on the javascript which carry their definition.
  90. Examples of UI modules:
  91. * Popups
  92. * Modals
  93. * Chatrooms
  94. * Calendar Pickers
  95. ## Usage
  96. ### Specification
  97. #### I want to contribute to the spec
  98. Semantic is very new standard, and we need a community to become truly useful. We're working currently to determine the best ways to engage the community for contribution. If you'd like to participate feel free to reach out by e-mail [semantic@quirky.com](mailto:semantic@quirky.com)