This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5eb3ad5
commit a682100
Showing
47 changed files
with
212 additions
and
1,719 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
# Features | ||
|
||
|
||
|
||
## Changing the section color scheme | ||
|
||
On a page with multiple sections, it can be helpful to distinguish the individual sections by using different colors schemes for each section. | ||
|
||
```html | ||
<il-page> | ||
<il-section color="white"> | ||
<p>Section one uses the white color scheme</p> | ||
</il-section> | ||
<il-section class="gray"> | ||
<p>Section two uses the gray color scheme</p> | ||
</il-section> | ||
</il-page> | ||
``` | ||
``` | ||
: : | ||
+-----------------------------------------------------------------------------+ | ||
| : : | | ||
| :Section one uses the white color scheme : | | ||
| : : | | ||
+-----------------------------------------------------------------------------+ | ||
| : : | | ||
| :Section two uses the gray color scheme : | | ||
| : : | | ||
+-----------------------------------------------------------------------------+ | ||
: : | ||
``` | ||
|
||
The available color schemes are: | ||
|
||
* white (default) | ||
* gray | ||
* orange | ||
* blue | ||
* blue-gradient | ||
* orange-gradient | ||
|
||
## Adding a background image | ||
|
||
To add a background image to a page section, use the `background` content slot. | ||
|
||
```html | ||
<il-section> | ||
<img src="background.jpg" alt="" slot="background"> | ||
<p>This section has a background image</p> | ||
</il-section> | ||
``` | ||
|
||
``` | ||
: : | ||
+-----------------------------------------------------------------------------+ | ||
|\ \ \ \ : \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ : \ \ \ \| | ||
| \ \ \ \:This section has a background image \ \ \ \ \ \ \ \ \ \ \ \:\ \ \ \ | | ||
|\ \ \ \ : \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ : \ \ \ \| | ||
+-----------------------------------------------------------------------------+ | ||
: : | ||
``` | ||
|
||
For complex background images or images without sufficient color contrast, the `il-inset` class is used to create an overlay using the color scheme of the parent section. | ||
|
||
```html | ||
<il-section color="blue"> | ||
<img src="background-with-poor-contrast.jpg" alt="" slot="background"> | ||
<div class="il-inset"> | ||
<p>This content will be inset from the background and use the blue color scheme.</p> | ||
</div> | ||
</il-section> | ||
``` | ||
|
||
``` | ||
: : | ||
+-----------------------------------------------------------------------------+ | ||
|########:###########################################################:########| | ||
|########:## ##:########| | ||
|########:## This content will be inset from the background and ##:########| | ||
|########:## use the blue color scheme. ##:########| | ||
|########:## ##:########| | ||
|########:###########################################################:########| | ||
+-----------------------------------------------------------------------------+ | ||
: : | ||
``` | ||
|
||
## Using grids inside sections | ||
|
||
When a grid is placed inside a section, the grid is contained within the content boundaries, including the backgrounds of any grid items. | ||
|
||
```html | ||
<il-section> | ||
<il-grid columns="3"> | ||
<div class="il-blue">Blue</div> | ||
<div class="il-white">White</div> | ||
<div class="il-orange">Orange</div> | ||
</il-grid> | ||
</il-section> | ||
``` | ||
|
||
``` | ||
- - - - -+-------------------+-------------------+-------------------+- - - - - | ||
| \ \ \ \ \ \ \ \ \ | | / / / / / / / / / | | ||
|\ \ \ \ \ \ \ \ \ \| |/ / / / / / / / / /| | ||
| \ \ \ Blue \ \ \ | White | / / / Orange / / | | ||
|\ \ \ \ \ \ \ \ \ \| |/ / / / / / / / / /| | ||
| \ \ \ \ \ \ \ \ \ | | / / / / / / / / / | | ||
- - - - -+-------------------+-------------------+-------------------+- - - - - | ||
: : | ||
: left content right content : | ||
: boundary boundary : | ||
``` | ||
|
||
To extend the backgrounds of grid items to the edge of the page, use the `background` attribute with a value of `grid`. Add the `il-background` class to grid items to extend the background of that item when it is the left-most or right-most item in a grid row. | ||
|
||
```html | ||
<il-section background="grid"> | ||
<il-grid columns="3"> | ||
<div class="il-blue il-background">The background of this item will extend to the left edge of the page.</div> | ||
<div class="il-white">This item is not at the end of a row, so it cannot extend its background.</div> | ||
<div class="il-orange">This item is at the end of a row but does not have the il-background class, so its background will not extend.</div> | ||
</il-grid> | ||
</il-section> | ||
``` | ||
|
||
``` | ||
+----------------------------+-------------------+-------------------+- - - - - | ||
|\ \ \ \ : \ \ \ \ \ \ \ \ \ | | / / / / / / / / / | | ||
| \ \ \ \:The background of \| This item is not | This item is at/ /| | ||
|\ \ \ \ :this item will \ \ | at the end of a | the end a the row | | ||
| \ \ \ \:extend to the left | row, so it cannot | but does not have/| | ||
|\ \ \ \ :edge of the page. \| extend its | the il-background | | ||
| \ \ \ \: \ \ \ \ \ \ \ \ \ | background. | class, so its/ / /| | ||
| \ \ \ \: \ \ \ \ \ \ \ \ \ | | background will / | | ||
| \ \ \ \: \ \ \ \ \ \ \ \ \ | | not extend./ / / /| | ||
+----------------------------+-------------------+-------------------+- - - - - | ||
: : | ||
: left content right content : | ||
: boundary boundary : | ||
``` | ||
|
||
When the grid item is an image, the `il-background` will extend it to the edge of the page when appropriate. **Please note** that this has the potential to crop the image in unpredictable ways and is intended for images whose purpose is primary decorative. | ||
|
||
|
||
```html | ||
<il-section background="grid" color="blue"> | ||
<il-grid columns="2"> | ||
<img src="background.jpg" alt="" class="il-background"> | ||
<div>This content is on the blue background of the section.</div> | ||
</il-grid> | ||
</il-section> | ||
``` | ||
``` | ||
+--------------------------------------+-----------------------------+--------+ | ||
|\ \ \ \ : \ \ \ \ \ \ \ \ \ \ \ \ \ \ | : | | ||
| \ \ \ \:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \| This content is on the blue : | | ||
|\ \ \ \ : \ \ \ \ \ \ \ \ \ \ \ \ \ \ | background of the section. : | | ||
| \ \ \ \:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \| : | | ||
+--------------------------------------+-----------------------------+--------+ | ||
: : | ||
: left content right content : | ||
: boundary boundary : | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.