From 961c353f48de6286a75c8d4ff8cb75594852ba4e Mon Sep 17 00:00:00 2001 From: Brent Jackson Date: Fri, 28 Jun 2019 14:30:32 -0400 Subject: [PATCH 1/3] Add RFC for level 2 specification --- RFC-Level-2.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 RFC-Level-2.md diff --git a/RFC-Level-2.md b/RFC-Level-2.md new file mode 100644 index 0000000..45ace50 --- /dev/null +++ b/RFC-Level-2.md @@ -0,0 +1,47 @@ + +# RFC: Theme Specification: Level 2 + +The base, level 1 theme specification defines the outer shape of a `theme` object. + +The current specification is intentionally limited in scope to allow for extension and interpretation for how typography, color, layout and other values are grouped and defined. +This allows for some level of interoperability among the different libraries that adhere to the spec, but does not ensure interoperability of the theme objects themselves. + +This proposal is for an optional specification that defines a schema for some of the individual scales in a theme object. +This is intended to make themes swappable and allow for transformations for use in libraries that do not adhere to this exact specification. + +For the purposes of this document, the term *level 1* is used to reference the current theme specification as-is, +and the term *level 2* is this optional specification that builds on top of the current specification's foundation. + +## Schema + +While the overall object is still intended to be extensible, the following keys should be defined in a theme that conforms to level 2. + +``` +{ + colors: { + text: String, + background: String, + primary: String, + secondary: String, + accent: String, + muted: String, + }, + fonts: { + body: String, + heading: String, + monospace: String, + }, + fontWeights: { + body: String or Number, + heading: String or Number, + bold: String or Number, + }, + lineHeights: { + body: String or Number, + heading: String or Number, + }, + fontSizes: Array (length 10), + space: Array (length 10), +} +``` + From 8247462a77692477c8fb404a21f099954941bd62 Mon Sep 17 00:00:00 2001 From: Brent Jackson Date: Fri, 28 Jun 2019 14:39:11 -0400 Subject: [PATCH 2/3] Edit rfc doc --- RFC-Level-2.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/RFC-Level-2.md b/RFC-Level-2.md index 45ace50..b317f56 100644 --- a/RFC-Level-2.md +++ b/RFC-Level-2.md @@ -1,8 +1,6 @@ # RFC: Theme Specification: Level 2 -The base, level 1 theme specification defines the outer shape of a `theme` object. - The current specification is intentionally limited in scope to allow for extension and interpretation for how typography, color, layout and other values are grouped and defined. This allows for some level of interoperability among the different libraries that adhere to the spec, but does not ensure interoperability of the theme objects themselves. From dc578a231d26c64682a26a4ed67343af9d5aec54 Mon Sep 17 00:00:00 2001 From: Brent Jackson Date: Fri, 28 Jun 2019 14:48:58 -0400 Subject: [PATCH 3/3] Edit rfc --- RFC-Level-2.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RFC-Level-2.md b/RFC-Level-2.md index b317f56..4515a06 100644 --- a/RFC-Level-2.md +++ b/RFC-Level-2.md @@ -13,6 +13,7 @@ and the term *level 2* is this optional specification that builds on top of the ## Schema While the overall object is still intended to be extensible, the following keys should be defined in a theme that conforms to level 2. +Additional, user-defined keys may be added to each scale as needed. ``` {