From 12cbd7ca490717729eaa6549bf577bdfa28c32cb Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Fri, 22 Sep 2017 14:19:43 +0800 Subject: [PATCH] cheatsheet-styles: update --- _sass/2017/components/h2-section.scss | 2 +- cheatsheet-styles.md | 45 ++++++++++++++------------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/_sass/2017/components/h2-section.scss b/_sass/2017/components/h2-section.scss index 0d357d45d..7db4d75e6 100644 --- a/_sass/2017/components/h2-section.scss +++ b/_sass/2017/components/h2-section.scss @@ -4,7 +4,7 @@ /* Hide the first h2 heading */ .h2-section { - &:first-child > h2 { + &:first-child:not(.-no-hide) > h2 { display: none; } diff --git a/cheatsheet-styles.md b/cheatsheet-styles.md index 439326a1b..c4ba3d0b2 100644 --- a/cheatsheet-styles.md +++ b/cheatsheet-styles.md @@ -4,41 +4,36 @@ layout: 2017/sheet tags: [WIP] intro: | This is a reference of styles that you can use on Devhints cheatsheets. How - meta! You can refer to this when contributing your own cheatsheets to the [GitHub repo](https://github.com/rstacruz/cheatsheets/). + meta! + You can refer to this when contributing your own cheatsheets to the [GitHub repo](https://github.com/rstacruz/cheatsheets/). --- -Sections +Intro +----- + +Variants -------- {: .-three-column} -### Adding variants -{: .-prime} - -``` -## Section -{: .-two-column} -``` - -Devhints uses Kramdown, and supports adding classes via Kramdown's syntax. - ### H2 sections -| `-one-column` | 1 column | -| `-two-column` | _(default)_ 2 columns | -| `-three-column` | 3 columns | +| `-one-column` | | +| `-two-column` | _(default)_| +| `-three-column` | | | `-left-reference` | 3 columns
_(short first column)_ | +| `-no-hide` | Don't hide H2 | See: [H2 sections](#two-columns) ### H3 sections -| `-prime` | Adds highlight | +| `-prime` | Highlight | See: [H3 sections](#h3-sections-1) ### Tables -| `-shortcuts` | For shortcut keys | +| `-shortcuts` | Shortcut keys | | `-left-align` | Don't right align last column | | `-headers` | Show headers | @@ -57,18 +52,26 @@ See: [Code](#code-1) | `-crosslink` | Has arrow on the link | {: .-gray} -Paragraphs are automatically gray, unless they're the first elements in an H3 section. - See: [Paragraphs](#paragraphs-1) ### Lists | `-also-see` | Lighter background | -| `-four-column` | 4 columns | -| `-six-column` | 6 columns | +| `-four-column` | | +| `-six-column` | | See: [Lists](#lists-1) +### Adding variants +{: .-prime} + +``` +## Section +{: .-two-column} +``` + +Devhints uses Kramdown, and supports adding classes via Kramdown's syntax. + H3 sections ----------- {: .-three-column}