From 029e72bac88621d5b438135ab43761ec4bd929c8 Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Wed, 12 Apr 2017 17:14:25 +0800 Subject: Add anchor links to Docs --- docs/components.html | 48 +++++++++++++++++++++++++++++------------------- docs/css/docs.css | 17 +++++++++++++++++ docs/elements.html | 16 ++++++++-------- docs/experimentals.html | 20 ++++++++++---------- docs/index.html | 14 +++++++------- docs/layout.html | 10 +++++----- docs/src/docs.less | 21 +++++++++++++++++++++ docs/utilities.html | 12 ++++++------ 8 files changed, 103 insertions(+), 55 deletions(-) (limited to 'docs') diff --git a/docs/components.html b/docs/components.html index bff66af..74b7ccb 100644 --- a/docs/components.html +++ b/docs/components.html @@ -99,7 +99,7 @@
-

Autocomplete

+

Autocomplete

Autocomplete form component provides suggestions while you type. It is often used for tags and contacts input.

@@ -223,7 +223,7 @@
-

Avatars

+

Avatars

Avatars are user profile pictures.

@@ -304,7 +304,7 @@
-

Badges

+

Badges

Badges are often used as unread number indicators.

@@ -380,7 +380,7 @@
-

Bars

+

Bars

Bars represent the progress of a task or the value within the known range. Bars are custom components for displaying HTML5 progress, meter and input range elements.

@@ -475,7 +475,7 @@
-

Cards

+

Cards

Cards are flexible content containers.

@@ -605,7 +605,7 @@
-

Chips

+

Chips

Chips are complex entities in small blocks.

@@ -663,7 +663,7 @@
-

Modals

+

Modals

Modals are flexible dialog prompts.

@@ -1003,11 +1005,13 @@
-

Popovers

+

Popovers

Popovers are small overlay content containers. Popovers component is built entirely in CSS.

@@ -1554,7 +1564,7 @@
-

Steps

+

Steps

Steps are progress indicators of a sequence of task steps.

@@ -1616,7 +1626,7 @@
-

Tiles

+

Tiles

Tiles are repeatable or embeddable information blocks.

@@ -1723,7 +1733,7 @@
-

Toasts

+

Toasts

Toasts are used to show alert or information to users.

@@ -1782,7 +1792,7 @@
-

Tooltips

+

Tooltips

Tooltips provide context information labels that appear on hover and focus.

diff --git a/docs/css/docs.css b/docs/css/docs.css index 0cf55d1..b1162e8 100644 --- a/docs/css/docs.css +++ b/docs/css/docs.css @@ -99,6 +99,23 @@ .docs-content header { padding-top: 6rem; } +.docs-content header:hover .anchor { + height: auto; + width: auto; +} +.docs-content .anchor { + height: 0; + margin-left: -1em; + overflow: hidden; + position: absolute; + width: 0; +} +.docs-content .anchor:focus, +.docs-content .anchor:hover { + height: auto; + text-decoration: none; + width: auto; +} .docs-content .notes { margin: 4rem 0; } diff --git a/docs/elements.html b/docs/elements.html index 0f9ee4e..488a120 100644 --- a/docs/elements.html +++ b/docs/elements.html @@ -81,7 +81,7 @@
-

Typography

+

Typography

Typography sets default styles for headings, paragraphs, semantic text, blockquote and lists elements.

@@ -287,7 +287,7 @@
-

Tables

+

Tables

Tables include default styles for tables and data sets.

@@ -349,7 +349,7 @@
-

Buttons

+

Buttons

Buttons include simple button styles for actions in different types and sizes.

@@ -501,7 +501,7 @@
-

Forms

+

Forms

Forms provide the most common control styles used in forms, including input, textarea, select, checkbox, radio and switch.

@@ -1009,7 +1009,7 @@
-

Icons experimental

+

Icons experimental

Icons are single-element, responsive and pure CSS icons. You can include spectre-icons.css located in the dist folder to your web <head> to have these CSS icons.

@@ -1258,7 +1258,7 @@
-

Labels

+

Labels

Labels are formatted text tags for highlighted, informative information.

@@ -1283,7 +1283,7 @@
-

Codes

+

Codes

Codes are inline and multiline code snippets.

For inline code, you can use the element <code>. For multiline code snippet blocks, you can use <pre> with the code class as a container, and add <code> inside it. The data-lang attribute is rendered as the language name in the top right.

@@ -1306,7 +1306,7 @@
-

Media

+

Media

Media includes responsive images, figures and video classes.

Add the img-responsive class to <img> elements. The images will scale with the parent sizes.

diff --git a/docs/experimentals.html b/docs/experimentals.html index fa1ced1..d88d8da 100644 --- a/docs/experimentals.html +++ b/docs/experimentals.html @@ -85,14 +85,14 @@
-

Experimentals

+

Experimentals

The Experimentals include experimental elements and features, mostly are not yet ready for wide use. These elements and components are limited inside spectre-exp.less before browsers fully support them. Sometimes, there are some specific browsers targeted components.

-

Calendars

+

Calendars

Calendars are designed for date or date range picker and events display. It is made with flex layout.

@@ -255,7 +255,7 @@
-

Carousels

+

Carousels

Carousels are slideshows for cycling images. It is built in pure CSS.

@@ -320,7 +320,7 @@
-

Comparison Sliders

+

Comparison Sliders

Comparison Sliders are sliders for comparing two images. It is built in pure CSS.

@@ -358,7 +358,7 @@
-

Filters

+

Filters

Filters are CSS only content filters.

@@ -483,7 +483,7 @@
-

Meters

+

Meters

Meters represent the value within the known range.

@@ -518,7 +518,7 @@
-

Parallax

+

Parallax

The Parallax acts like Apple TV/tvOS hover parallax effect. It is built in pure CSS.

@@ -561,7 +561,7 @@
-

Progress

+

Progress

The Progress indicates the progress completion of a task.

@@ -588,7 +588,7 @@
-

Sliders

+

Sliders

Sliders are for selecting values from ranges.

@@ -608,7 +608,7 @@
-

Timelines

+

Timelines

Timelines are ordered sequences of activities.

diff --git a/docs/index.html b/docs/index.html index e4dbf45..cc8d444 100644 --- a/docs/index.html +++ b/docs/index.html @@ -117,7 +117,7 @@
-

Introduction

+

Introduction

Spectre.css is a lightweight and responsive and modern CSS framework for faster and extensible development.

Spectre provides basic styles for typography and elements, flexbox based responsive layout system, CSS components and utilities with best practice coding and consistent design language.

@@ -125,7 +125,7 @@
-

Installation

+

Installation

There are 4 ways to get started with Spectre CSS framework in your projects. You can either manually install or use NPM, Yarn and Bower.

@@ -171,7 +171,7 @@
-

Custom version

+

Custom version

Spectre uses Gulp for compiling CSS. You can customize your version of Spectre.css by editing LESS files in /src directory or removing unneeded components from spectre.less, spectre-exp.less and spectre-icons.less.

Then, you can build the CSS file from the command line:

@@ -220,7 +220,7 @@ └── spectre.less -

Variables

+

Variables

Spectre.css is designed with consistent design language. You can modify variables.less to create your new or match existing design.

Colors
@@ -306,11 +306,11 @@
-

Accessibility coming soon

+

Accessibility coming soon

-

Browser support

+

Browser support

Spectre uses Autoprefixer to make most styles compatible with earlier browsers and Normalize.css for CSS resets. Spectre is designed for modern browsers. For best compatibility, these browsers are recommended:

    @@ -325,7 +325,7 @@
-

What's new

+

What's new

April 2017

    diff --git a/docs/layout.html b/docs/layout.html index 565fd9c..9c5c3e0 100644 --- a/docs/layout.html +++ b/docs/layout.html @@ -72,7 +72,7 @@
    -

    Flexbox grid

    +

    Flexbox grid

    Layout includes flexbox based responsive grid system with 12 columns.

    @@ -182,7 +182,7 @@
    -

    Responsive grid

    +

    Responsive grid

    Spectre provides a neat responsive layout grid system and responsive visibility utilities.

    @@ -368,7 +368,7 @@
    -

    Panels

    +

    Panels

    Panels are flexible view container layout with auto-expand content section.

    @@ -610,7 +610,7 @@
    -

    Empty states / blank slates

    +

    Empty states / blank slates

    Empty states/blank slates are commonly used as placeholders for first time use, empty data and error screens.

    diff --git a/docs/src/docs.less b/docs/src/docs.less index ff6f1a7..06910f2 100644 --- a/docs/src/docs.less +++ b/docs/src/docs.less @@ -123,6 +123,27 @@ header { padding-top: 6rem; + + &:hover { + .anchor { + height: auto; + width: auto; + } + } + } + + .anchor { + height: 0; + margin-left: -1em; + position: absolute; + overflow: hidden; + width: 0; + &:focus, + &:hover { + height: auto; + text-decoration: none; + width: auto; + } } .notes { diff --git a/docs/utilities.html b/docs/utilities.html index 9e11ab2..e70372a 100644 --- a/docs/utilities.html +++ b/docs/utilities.html @@ -75,7 +75,7 @@
    -

    Position utilities

    +

    Position utilities

    Position utilities are used for useful layout and position things, including clearfix, float, position and margin/padding utilities.

    @@ -103,7 +103,7 @@
    -

    Display utilities

    +

    Display utilities

    Display utilities are used for display and hidden things.

    @@ -134,7 +134,7 @@
    -

    Text utilities

    +

    Text utilities

    Text utilities are used for text alignment, styles and overflow things.

    @@ -176,7 +176,7 @@
    -

    Shape utilities

    +

    Shape utilities

    Shape utilities are used for change element shapes.

    @@ -191,7 +191,7 @@
    -

    Divider

    +

    Divider

    A Divider is used for separating elements.

    @@ -216,7 +216,7 @@
    -

    Loading

    +

    Loading

    Loading indicator is used for loading or updating. Also, you can add the loading class to buttons for loading status.

    -- cgit v1.3.1-26-gb76a