diff --git a/docs/source/_assets/less/main.less b/docs/source/_assets/less/main.less index f6cd34fe5..88db90491 100644 --- a/docs/source/_assets/less/main.less +++ b/docs/source/_assets/less/main.less @@ -1,10 +1,22 @@ @import "../../../../src/reset"; @import "../../../../src/utilities"; @import "prism"; +@import "markdown"; + +*, +*::before, +*::after { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} a { color: inherit; text-decoration: none; + + &:hover { + .text-underline; + } } .define-text-color('primary'; @@ -18,22 +30,3 @@ a { 'light' #a0cfee, 'dark' #2980b9 ;); - -.title { - .mb-4; - .leading-none; - .text-dark-softer; - .text-thin; - .text-2xl; - .text-primary; -} - -.subtitle { - .mt-8; - .mb-6; - .leading-none; - .text-dark-softer; - .text-thin; - .text-xl; - .text-primary; -} diff --git a/docs/source/_assets/less/markdown.less b/docs/source/_assets/less/markdown.less new file mode 100644 index 000000000..b40f67492 --- /dev/null +++ b/docs/source/_assets/less/markdown.less @@ -0,0 +1,44 @@ +.markdown { + a { + .text-primary; + } + + code.inline { + .border; + .rounded; + .text-sm; + .px-1; + color: #DD4A68; + } + + blockquote { + .text-em; + .text-dark-soft; + .text-sm; + } + + h1 { + .mb-4; + .leading-none; + .text-dark-softer; + .text-thin; + .text-2xl; + .text-primary; + } + + h2 { + .mt-8; + .mb-6; + .leading-none; + .text-dark-softer; + .text-thin; + .text-xl; + .text-primary; + } + + p { + .mt-6; + .mb-3; + } + +} diff --git a/docs/source/_assets/less/prism.less b/docs/source/_assets/less/prism.less index 3d923535a..15001e318 100644 --- a/docs/source/_assets/less/prism.less +++ b/docs/source/_assets/less/prism.less @@ -15,7 +15,7 @@ pre[class*="language-"] { word-spacing: normal; word-break: normal; word-wrap: normal; - line-height: 1.4; + line-height: 1.5; -moz-tab-size: 4; -o-tab-size: 4; @@ -51,8 +51,8 @@ code[class*="language-"]::selection, code[class*="language-"] ::selection { /* Code blocks */ pre[class*="language-"] { padding: 0.75em 1em; - margin: .5em 0; overflow: auto; + .my-4; } :not(pre) > code[class*="language-"], diff --git a/docs/source/_layouts/master.blade.php b/docs/source/_layouts/master.blade.php index 0d623fab1..f9a0b7ac2 100644 --- a/docs/source/_layouts/master.blade.php +++ b/docs/source/_layouts/master.blade.php @@ -4,13 +4,13 @@ -
Using the utilities in HTML:
- -{{ '
-
-
-
-
-
-
-
-
-
-
-' }}
-
-Using the utilities in Less:
- -div {
- .bg-light;
- .bg-light-soft;
- .bg-light-softer;
- .bg-light-softest;
-
- .bg-dark;
- .bg-dark-soft;
- .bg-dark-softer;
- .bg-dark-softest;
-
- // Responsive example
- .screen(lg, {
- .bg-light;
- });
-}
-
-Generate custom background utilities:
- -.define-text-color('primary';
- default #3498db,
- 'light' #a0cfee,
- 'dark' #2980b9
-;);
-
-Using custom background utilities in HTML:
- -{{ '
-
-
-
-
-' }}
-
-Using custom background utilities in Less:
- -div {
- .bg-primary;
- .bg-primary-light;
- .bg-primary-dark;
-
- // Responsive example
- .screen(lg, {
- .bg-primary;
- });
-}
-
-@endsection
diff --git a/docs/source/backgrounds.md b/docs/source/backgrounds.md
new file mode 100644
index 000000000..cefc3a8ca
--- /dev/null
+++ b/docs/source/backgrounds.md
@@ -0,0 +1,97 @@
+---
+extends: _layouts.master
+title: "Backgrounds"
+---
+
+# Backgrounds
+
+Using the utilities in HTML:
+
+```html
+
+
+
+
+
+
+
+
+
+```
+
+Using the utilities in Less:
+
+```less
+div {
+ .bg-light;
+ .bg-light-soft;
+ .bg-light-softer;
+ .bg-light-softest;
+
+ .bg-dark;
+ .bg-dark-soft;
+ .bg-dark-softer;
+ .bg-dark-softest;
+}
+```
+
+## Responsive
+
+The background utitlies can also be used with responsive prefixes:
+
+```html
+
+
+
+```
+
+```less
+// Using the utilities in Less:
+
+div {
+ .screen(lg, {
+ .bg-light;
+ });
+}
+```
+
+
+## Custom backgrounds
+
+How to generate custom background utilities:
+
+```less
+.define-text-color('primary';
+ default #3498db,
+ 'light' #a0cfee,
+ 'dark' #2980b9
+;);
+```
+
+How to use custom background utilities:
+
+```html
+
+
+
+
+
+
+
+
+```
+
+```less
+// Using custom utilities in Less:
+
+div {
+ .bg-primary;
+ .bg-primary-light;
+ .bg-primary-dark;
+
+ // Responsive example
+ .screen(lg, {
+ .bg-primary;
+ });
+}
+```
diff --git a/docs/source/borders.blade.php b/docs/source/borders.blade.php
deleted file mode 100644
index d0e8fc8ff..000000000
--- a/docs/source/borders.blade.php
+++ /dev/null
@@ -1,7 +0,0 @@
-@extends('_layouts.master', ['title' => 'Borders'])
-
-@section('body')
-
-The constrain utilities are simply max-width helpers designed to constrain content to a desired width.
Using the utilities in HTML:
- -{{ '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.
-
-
-Lorem ipsum dolor...' }}
-
-Using the utilities in Less:
- -div {
- .constrain-xs;
- .constrain-sm;
- .constrain-md;
- .constrain-lg;
- .constrain-xl;
- .constrain-2xl;
- .constrain-3xl;
- .constrain-4xl;
- .constrain-5xl;
-
- // Responsive example
- .screen(md, {
- .constrain-xl;
- });
-}
-
-Tailwind exposes the following variables to allow modification of the constrain utilities.
- -@constrain-xs: 20rem;
-@constrain-sm: 30rem;
-@constrain-md: 40rem;
-@constrain-lg: 50rem;
-@constrain-xl: 60rem;
-@constrain-2xl: 70rem;
-@constrain-3xl: 80rem;
-@constrain-4xl: 90rem;
-@constrain-5xl: 100rem;
-
-@endsection
diff --git a/docs/source/constrain.md b/docs/source/constrain.md
new file mode 100644
index 000000000..6d6baee11
--- /dev/null
+++ b/docs/source/constrain.md
@@ -0,0 +1,71 @@
+---
+extends: _layouts.master
+title: "Constrain"
+---
+
+# Constrain
+
+The constrain utilities are simply max-width helpers designed to constrain content to a desired width.
+
+```html
+
+
+The display utilities simply display property helpers.
Using the utilities in HTML:
- -{{ '
-
-
-
-
-
-
-
-
-
-
-' }}
-
-Using the utilities in Less:
- -div {
- .block;
- .inline-block;
- .table;
- .table-row;
- .table-cell;
- .hidden;
-
- // Responsive example
- .screen(lg, {
- .inline-block;
- });
-}
-
-@endsection
diff --git a/docs/source/display.md b/docs/source/display.md
new file mode 100644
index 000000000..8f843f36a
--- /dev/null
+++ b/docs/source/display.md
@@ -0,0 +1,57 @@
+---
+extends: _layouts.master
+title: "Display"
+---
+
+# Display
+
+> If you're looking for flexbox utilities, see the [flexbox](/flexbox) page.
+
+The display utilities simply display property helpers.
+
+```html
+
+
+
+
+
+
+Welcome to Tailwind CSS! Tailwind is a utility-first CSS framework designed for rapid UI development. 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.
- -@endsection diff --git a/docs/source/index.md b/docs/source/index.md new file mode 100644 index 000000000..d0af32d88 --- /dev/null +++ b/docs/source/index.md @@ -0,0 +1,24 @@ +--- +extends: _layouts.master +title: "Welcome" +--- + +# Welcome + +Welcome to Tailwind CSS! Tailwind is a utility-first CSS framework designed for rapid UI development. 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. + +## Quick example + +
+
+ Install Tailwind using NPM:
- -npm install tailwindcss
-
-@endsection
diff --git a/docs/source/installation.md b/docs/source/installation.md
new file mode 100644
index 000000000..b032b3e4f
--- /dev/null
+++ b/docs/source/installation.md
@@ -0,0 +1,12 @@
+---
+extends: _layouts.master
+title: "Installation"
+---
+
+# Installation
+
+Install Tailwind using NPM:
+
+```bash
+npm install tailwindcss
+```
diff --git a/docs/source/position.blade.php b/docs/source/position.blade.php
deleted file mode 100644
index 03131de17..000000000
--- a/docs/source/position.blade.php
+++ /dev/null
@@ -1,45 +0,0 @@
-@extends('_layouts.master', ['title' => 'Position'])
-
-@section('body')
-
-The position utilities are primarily position property helpers.
Using the utilities in HTML:
- -{{ '
-
-' }}
-
-Using the utilities in Less:
- -div {
- .fixed;
- .absolute;
- .relative;
-}
-
-Tailwind also provides pin utilties, useful for "pinning" absolutely positioned elements using the top, right, bottom and left properties.
Using the utilities in HTML:
- -{{ '
-
-' }}
-
-Using the utilities in Less:
- -div {
- .pin-t
- .pin-r
- .pin-b
- .pin-l
- .pin-y
- .pin-x
- .pin
-}
-
-@endsection
diff --git a/docs/source/position.md b/docs/source/position.md
new file mode 100644
index 000000000..d09b65fe8
--- /dev/null
+++ b/docs/source/position.md
@@ -0,0 +1,72 @@
+---
+extends: _layouts.master
+title: "Position"
+---
+
+# Position
+
+The position utilities are primarily position property helpers.
+
+```html
+
+
+
+
+
+```
+
+```less
+// Using the utilities in Less:
+
+div {
+ .fixed;
+ .absolute;
+ .relative;
+}
+```
+
+## Pinning absolute content
+
+Tailwind also provides pin utilties, useful for "pinning" absolutely positioned elements using the top, right, bottom and left properties.
+
+```html
+
+
+.pt-2 would add padding to the top of the element to the value of 0.5rem and .mx-0 would make the horizontal margin zero.
-The syntax below is combined to create a system for padding and margins. For example, .pt-2 would add padding to the top of the element to the value of 0.5rem and .my-0 would make the horizontal margin zero.
pmpullp Paddingm Marginpull Negative Marginl Leftt Topr Rightb Bottomt Topv Verticalh Horizontall Leftx Horizontaly Vertical0 01 0.25rem2 0.5rem