aboutsummaryrefslogtreecommitdiff
path: root/docs/theme-versioning.md
diff options
context:
space:
mode:
authorcristiano <[email protected]>2020-06-03 22:10:50 +0100
committercristiano <[email protected]>2020-06-03 22:10:50 +0100
commit2b1a47dd7dc4eb3abdff768f54b3e67f4faeb3de (patch)
treeb890f4733f9da423a620bca317d9288e579f9a21 /docs/theme-versioning.md
parent2247785a534e67df73d76323780849367dbb8684 (diff)
downloadprotonmail-themes-2b1a47dd7dc4eb3abdff768f54b3e67f4faeb3de.tar.xz
protonmail-themes-2b1a47dd7dc4eb3abdff768f54b3e67f4faeb3de.zip
Added updated documentation pages to codebase.
Outdated version previously available at Github Wiki.
Diffstat (limited to 'docs/theme-versioning.md')
-rw-r--r--docs/theme-versioning.md48
1 files changed, 48 insertions, 0 deletions
diff --git a/docs/theme-versioning.md b/docs/theme-versioning.md
new file mode 100644
index 0000000..87fcf07
--- /dev/null
+++ b/docs/theme-versioning.md
@@ -0,0 +1,48 @@
+# Theme Versioning
+
+In `templates/@theme-base/` there is a `_version.scss` partial. This partial includes a single line of code that aids in keeping the version of all themes up to date:
+
+```scss
+$version: 'v4.0.0-beta15';
+```
+
+This variable is used in all themes by default and it will print the current version when a theme is compiled. For example, this theme header:
+
+```scss
+@import "../@theme-base/version";
+
+/*! =========================================== *
+ * SLICK THEME
+ * Version: #{$version}
+ * Author: ProtonMail
+ * Website: www.protonmail.com
+ * Twitter: @protonmail
+ * =========================================== */
+```
+
+Will compile to:
+
+```scss
+/*! =========================================== *
+ * SLICK THEME
+ * Version: v4.0.0-beta15
+ * Author: ProtonMail
+ * Website: www.protonmail.com
+ * Twitter: @protonmail
+ * =========================================== */
+```
+
+In some cases a theme might have a specific version it is compatible with. In that case the variable can be pointed to another version on the theme template file:
+
+```scss
+@import "../@theme-base/version";
+$version: "v4.0.0-beta3";
+
+/*! =========================================== *
+ * SLICK THEME
+ * Version: #{$version}
+ * Author: ProtonMail
+ * Website: www.protonmail.com
+ * Twitter: @protonmail
+ * =========================================== */
+```