Skip to content

Commit

Permalink
New no-dec, some other small things
Browse files Browse the repository at this point in the history
- New no-dec styles, for selectively clearing default styles for key semantic HTML tags.
- gutter.styl has a comment about upcoming CSS gap property.
- Removed tabs in display.styl because tabs are very inconsistent!
  • Loading branch information
dzuk-mutant committed Nov 25, 2019
1 parent 2a133d2 commit 9555053
Show file tree
Hide file tree
Showing 8 changed files with 483 additions and 27 deletions.
9 changes: 6 additions & 3 deletions docs/docs.md
Expand Up @@ -26,16 +26,19 @@ Methods of containing things.
### Simple Objects

#### [Bidirectionality](bidir.md)
Shortcuts enhancing the bidirectionality of your designs.
Shortcuts for enhancing the bidirectionality of your designs.

#### [Dimensions](dimen.md)
Shortcuts for sizing objects.


#### [Prefixes](prefixes.md)
A few polyfills for browser prefixing.

#### [No Decoration](no_dec.md)
Selectively clearing default styles for various semantic HTML tags.


### Other

#### [Helium 2 Changes](helium_2_changes.md)
Changes between Helium 2 and previous versions.
Changes between Helium 2 and previous versions.
26 changes: 26 additions & 0 deletions docs/no_dec.md
@@ -0,0 +1,26 @@
# No Decoration

These are a series of classes to extend when you want to clear default styles for various semantic HTML tags that have very specific/strong default style behaviour.
---

## `a.no-dec`
Removes default link colours and underlines.

```
menu
a.home
@extends a.no-dec
// applies no-dec to a.home.
```

## `ul.no-dec`
Removes default spacing and list decoration for unordered lists and their direct `li` children.

```
menu
ul.sections
@extends ul.no-dec
// applies to ul.sections itself and it's direct li children.
```
48 changes: 24 additions & 24 deletions helium/stuff/display.styl
Expand Up @@ -115,7 +115,7 @@ handset-1-max = handset-2-min - 1px

// standard-size tablets in portrait (~8-10")

tall = 850px
tall = 850px



Expand All @@ -124,8 +124,8 @@ tall = 850px

// 720p, tablets and laptop displays in landscape.

medium = 500px
medium-max = tall - 1px
medium = 500px
medium-max = tall - 1px



Expand All @@ -134,8 +134,8 @@ medium-max = tall - 1px

// handsets in landscape.

limited = 0px
limited-max = medium - 1px
limited = 0px
limited-max = medium - 1px



Expand All @@ -146,16 +146,16 @@ limited-max = medium - 1px
// ----------------------


handset-1 = screen-max(width, handset-1-max)
handset-2 = screen-min-max(width, handset-2-min, handset-2-max)
handset-3 = screen-min-max(width, handset-3-min, handset-3-max)
handset-1 = screen-max(width, handset-1-max)
handset-2 = screen-min-max(width, handset-2-min, handset-2-max)
handset-3 = screen-min-max(width, handset-3-min, handset-3-max)

portable-1 = screen-min-max(width, portable-1-min, portable-1-max)
portable-2 = screen-min-max(width, portable-2-min, portable-2-max)
portable-3 = screen-min-max(width, portable-3-min, portable-3-max)
portable-1 = screen-min-max(width, portable-1-min, portable-1-max)
portable-2 = screen-min-max(width, portable-2-min, portable-2-max)
portable-3 = screen-min-max(width, portable-3-min, portable-3-max)

wide-1 = screen-min-max(width, wide-1-min, wide-1-max)
wide-2 = screen-min(width, wide-2-min)
wide-1 = screen-min-max(width, wide-1-min, wide-1-max)
wide-2 = screen-min(width, wide-2-min)



Expand All @@ -164,20 +164,20 @@ wide-2 = screen-min(width, wide-2-min)
// display groups
// ----------------------

handset-min = handset-1-min
handset-max = handset-3-max
portable-min = portable-1-min
portable-max = portable-3-max
wide-min = wide-1-min
handset-min = handset-1-min
handset-max = handset-3-max
portable-min = portable-1-min
portable-max = portable-3-max
wide-min = wide-1-min

handset = screen-max(width, handset-max)
portable = screen-min-max(width, portable-min, portable-max)
wide = screen-min(width, wide-min)
handset = screen-max(width, handset-max)
portable = screen-min-max(width, portable-min, portable-max)
wide = screen-min(width, wide-min)


limited = screen-max(height, limited-max)
medium = screen-min-max(height, medium, medium-max)
tall = screen-min(height, tall)
limited = screen-max(height, limited-max)
medium = screen-min-max(height, medium, medium-max)
tall = screen-min(height, tall)



Expand Down
5 changes: 5 additions & 0 deletions helium/stuff/gutter.styl
Expand Up @@ -19,6 +19,11 @@ Uniformly gives the same margin to all items.
- gutter(<vertical margin>; <horizontal margin>);
Gives different horizontal and vertical margins.
This will eventually be replaced in the future with
the CSS gap property.
*/


Expand Down
25 changes: 25 additions & 0 deletions helium/stuff/no-dec.styl
@@ -0,0 +1,25 @@
/*
no-dec
Some quick and dirty styles that you can incorporate to
clear default stylings for key semantic HTML tags, giving you a blank
slate to write new styles.
*/

// clears default link styling
a.no-dec
color: inherit
text-decoration: none

// clears default list styling
ul.no-dec
list-style: none
margin-top: 0
margin-bottom: 0
padding-left: 0
padding-right: 0

> li
margin-bottom: 0

0 comments on commit 9555053

Please sign in to comment.