Browse Source

fixes some language

pull/13/head
Jack Lukic 11 years ago
parent
commit
b681fd7d3d
4 changed files with 5 additions and 143 deletions
  1. 138
      node/src/documents/specification/authoring.html
  2. 2
      node/src/documents/specification/cssguide.html
  3. 2
      node/src/documents/specification/htmlguide.html
  4. 6
      node/src/documents/specification/styleguide.html

138
node/src/documents/specification/authoring.html

@ -1,138 +0,0 @@
---
layout : 'default'
css : 'guide'
title : 'Spec Files'
type : 'UI Specification'
---
<div class="segment">
<div class="container">
<h1 class="ui header">Spec Files</h1>
</div>
</div>
<div class="main container">
<h2>Introduction</h2>
<p>Semantic defines an exchange format for user interface. Writing your interface components to match the specifications allows others to easily use your interface components in their project.</p>
<h3>Writing a Spec File</h3>
<p>Before authoring an element you should begin by writing a spec file for your element. A specification file defines the structure and names used inside your element. For more information on naming convention visit our css and html guides.</p>
<p>A spec file also allows you to provide metadata to generate code for your element, this can be used to generate visual documentation of your element.</p>
<h3>Common Specification</h3>
<p>A spec file is a specially formatted json file.</p>
<div class="code" type="javascript">
{
// your element name should be a single word and match to the classname of your element
"Name": "Button",
// you may include metadata
"Author": "Jack Lukic",
"Website": "http://www.semantic-ui.com"
"Version": "2.0",
// All elements must specify whether it is an element, collection, module, or behavior
"Type": "Element",
// definition of the html structure of each type of an element
"Types": {
"Standard" : ".ui.button"
},
// States are ways which elements show an innate change in its quality.
"States": {
"Active" : "active",
"Loading" : "loading",
"Disabled" : "disabled"
},
// Variations are individual classnames which your element may receive to alter its look. Variations should, for the most part, be able to be used together to create more complex styles of an element.
"Variations": {
// If a set of variations are options of a single type (for example sizing may contain, small, medium, etc) then this can be defined as an array.
"Size": [
"mini",
"tiny",
"small",
"medium",
"large",
"huge",
"massive"
],
// Types are exclusive forms of your element. For example a button cannot be an icon button and a text button. The definitions of the html structure of each element is written using emmet syntax. These are used to generate html structures for your elements. For more information visit: http://docs.emmet.io/abbreviations/syntax/
"Types": {
"Standard" : ".ui.button",
"Icon" : ".ui.icon.button > i.icon",
}
"Color": [
"black",
"green",
"red",
"blue",
"green",
"red",
"teal"
],
"Ordinality": [
"secondary",
"tertiary"
],
"Attached": [
"attached top",
"attached bottom",
"attached left",
"attached right"
],
"Circular" : "circular",
"Fluid" : "fluid"
},
// You may define a list of dummy text and selectors which can be filled with them. This is used by generators to export a style guide of your interface element. If you specify an array, each item will be used in order to fill the content of each match.
"Text": {
".ui.button": ["Button", "Click Me", "Lorem Ipsum"]
},
// Your module may optionally include a text definition of its variations to help clarify their purpose. This may include the definition of types or variations
"Definition": {
"Standard" : "A simple button",
"Icon" : "A button icon is formatted to contain only an icon",
"Size" : "A button can vary in size",
"Color" : "A button can have different colors",
"Ordinality" : "A button can blend into a page",
"Attached" : "A button can attach to other content",
"Circular" : "A button can be circular",
"Fluid" : "A button can be fluid"
}
}
</div>
<h3>UI Elements</h3>
<p>A UI element is a basic building block of a website. It may have a singular or group (plural) definition</p>
<div class="code" type="javascript">
{
// in addition to the parameters above an element may contain a definition for its singular and plural type
"Types": {
// these types can only exist for class="ui button"
"Singular": {
"Standard" : ".ui.button",
"Icon" : ".ui.icon.button > i.add.icon",
"Labeled Icon" : ".ui.labeled.icon.button > i.add.icon"
},
// these types can exist only for class="ui button"
"Group": {
"Standard" : ".ui.buttons > .button+.button+.button",
"Icon" : ".ui.buttons > ( (.button > i.icon.user) + (.button > i.icon.heart) + (.button > i.icon.lab))",
"Conditional" : ".ui.buttons > .button+.or+.button",
"Vertical" : ".vertical.ui.buttons > .button+.button+.button"
}
}
}
</div>
</div>

2
node/src/documents/specification/cssguide.html

@ -2,7 +2,7 @@
layout : 'default'
css : 'guide'
title : 'CSS Guide'
title : 'CSS'
type : 'UI Specification'
---
<div class="segment">

2
node/src/documents/specification/htmlguide.html

@ -2,7 +2,7 @@
layout : 'default'
css : 'guide'
title : 'HTML Guide'
title : 'HTML'
type : 'UI Specification'
---
<div class="segment">

6
node/src/documents/specification/styleguide.html

@ -2,7 +2,7 @@
layout : 'default'
css : 'guide'
title : 'Authoring Guide'
title : 'Language'
type : 'UI Specification'
---
<div class="segment">
@ -12,9 +12,9 @@ type : 'UI Specification'
</div>
<div class="main container">
<h2>Creating UI Definitions</h2>
<h2>UI Language</h2>
<p>Defining anything will involve some slightly arbitrary decision making. The goal of semantic is not to create code that is free from prescription, but to create code that tends to avoid it if possible.</p>
<p>Defining anything will involve some subjectivity. The goal of semantic is not to create code that is free from prescription, but to create code that tends to avoid arbitrary decisions if a conventional choice presents itself.</p>
<p>The following are some guidelines which help avoid some common pitfalls in writing UI element definitions.</p>
<div class="example">

Loading…
Cancel
Save