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.

138 lines
4.2 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
  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 conventions for UI elements, outlining states that an elements can exist, and describing common variations of tnat element.
  6. ## How
  7. Just like English, adjectives, or *variations*, have meaning based on the context of the noun, the *ui element*.
  8. We know a big planet is a different size than a big house, but we can still describe the quality of something that is big. In the same way, in Semantic, variations maintain context based on the element they modify, but keep the same vocabulary between elements, e.g. a big activity feed, is different than a big progress bar.
  9. For example here is part of Semantic's definition of a button
  10. **Standard**: A button is a shape that can be pressed in to complete an action
  11. ```html
  12. <div class="ui button"></div>
  13. ```
  14. **State**: A button can sometimes be active, or selected by the user
  15. ``` html
  16. <div class="ui active button">
  17. ```
  18. **Variations**: A button may sometimes look different than a simple button.
  19. ``` html
  20. <div class="ui large blue icon button">
  21. <i class="ui icon heart"></i>
  22. </div>
  23. ```
  24. **Plurality**: A button can sometimes exist in a group of buttons
  25. ``` html
  26. <div class="ui large blue buttons">
  27. <div class="ui button">
  28. I am blue
  29. </div>
  30. <div class="ui button">
  31. I am blue too
  32. </div>
  33. </div>
  34. ```
  35. ## Types of UI
  36. UI components are split into four categories:
  37. * UI elements
  38. * UI Collections
  39. * UI VIews
  40. * UI Modules
  41. All UI definitions are made of a neutral prototypical definition, a list of states it can occupy, and a set of common variations or "types" of that element.
  42. ### UI Elements
  43. UI Elements are basic design elements. Any part of the element cannot be thought of as something separate, although they may be made up of parts. In chemistry, you can think of this as an "element".
  44. They may also may be useful sometimes to define in plural. Groups of UI elements are always homogenous.
  45. For example in this case each button can be described as large because we understand it is a type of large button
  46. ``` html
  47. <div class="large buttons">
  48. <div class="ui button">Cancel</div>
  49. <div class="ui positive button">Continue</div>
  50. </div>
  51. ```
  52. Examples of UI elements:
  53. * Buttons
  54. * Labels
  55. * Headers
  56. * Progress bars
  57. ### UI Collections
  58. UI Collections are groups of heteregeneous UI elements which are usually found together. These can be thought of as molecules.
  59. UI collections do not usually require all elements to be found, but they describe a list of the "usual suspects". Collections are not typically useful to define in plural.
  60. Examples of UI collections:
  61. * Forms
  62. * Tables
  63. * Grids (Layout)
  64. * Menus
  65. ## UI Views
  66. UI Views are common ways that UI collections are grouped together. The focus is not on providing a specific interaction, but providing a view for a website's content. These might be difficult to define completely.
  67. Examples of UI views:
  68. ** Comment Feed
  69. ** Activity Feed
  70. ** Product List
  71. ## UI Modules
  72. UI modules are UI elements where it's behavior is a fundamental part of its existence.
  73. Examples of UI modules:
  74. * Popups
  75. * Modals
  76. * Chatrooms
  77. * Calendar Pickers
  78. ## Usage
  79. ### Specification
  80. #### I want to contribute to the spec
  81. Semantic is very new. We're still working out the best way to join in the discussion.
  82. We're currently working to figure ouin [coding guidelines](http://semantic-ui.com/guidelines).
  83. ###Library
  84. You can use our build tool to select only the components you want
  85. http://semantic-ui.com/download
  86. Or download the whole kit and kaboodle
  87. http://semantic-ui.com/ui/semantic.min.css
  88. http://semantic-ui.com/ui/semantic.min.js
  89. * **Designers**: Semantic, provides a standard set of des
  90. * **Authors**: If you'd like to design elements to be available for other developers, download the author's distribution pack which includes a definition pack to help you start writing custom designs for Semantic.
  91. Why Semantic
  92. -------------
  93. HTML is developed by committee. Seman