From 2cec5cd493e43da17e095d8f17c48080d90500a8 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Tue, 29 Jan 2019 16:00:57 -0800 Subject: [darwin, docs] Add jazzy styling for deprecated/unavailable methods --- platform/darwin/docs/theme/assets/css/jazzy.css.scss | 9 +++++---- platform/darwin/docs/theme/templates/deprecation.mustache | 12 ++++++++++++ platform/darwin/docs/theme/templates/doc.mustache | 1 + platform/darwin/docs/theme/templates/task.mustache | 3 ++- 4 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 platform/darwin/docs/theme/templates/deprecation.mustache diff --git a/platform/darwin/docs/theme/assets/css/jazzy.css.scss b/platform/darwin/docs/theme/assets/css/jazzy.css.scss index ff6d2a374c..7800c08e43 100644 --- a/platform/darwin/docs/theme/assets/css/jazzy.css.scss +++ b/platform/darwin/docs/theme/assets/css/jazzy.css.scss @@ -523,6 +523,9 @@ h1 > .anchor-icon { margin-bottom: 2px; } background-repeat: no-repeat; } + .discouraged { + text-decoration: line-through; + } .declaration-note { font-size: 13px; color: #808080; @@ -571,6 +574,7 @@ h1 > .anchor-icon { margin-bottom: 2px; } padding: 6px 12px; margin: 12px 0; border-left: $aside_border; + border-radius: 4px; overflow-y: hidden; .aside-title { font-size: 10px; @@ -579,7 +583,6 @@ h1 > .anchor-icon { margin-bottom: 2px; } text-transform: uppercase; padding: 2px 8px; display: inline; - border-radius: 4px; margin: 0; -webkit-user-select: none; } @@ -590,19 +593,17 @@ h1 > .anchor-icon { margin-bottom: 2px; } .language { background: $color_light; - border-radius: 4px; border-left: $declaration_language_border; } .aside.aside-see, .aside.aside-note, { background: $color_light; - border-radius: 4px; .aside-title { padding-left: 0px; } } -.aside-warning { +.aside-warning, .aside-deprecated, .aside-unavailable { border-left: $aside_warning_border; .aside-title { color: $aside_warning_color; diff --git a/platform/darwin/docs/theme/templates/deprecation.mustache b/platform/darwin/docs/theme/templates/deprecation.mustache new file mode 100644 index 0000000000..34ce9b1d02 --- /dev/null +++ b/platform/darwin/docs/theme/templates/deprecation.mustache @@ -0,0 +1,12 @@ +{{#deprecation_message}} +
+

Deprecated

+ {{{deprecation_message}}} +
+{{/deprecation_message}} +{{#unavailable_message}} +
+

Unavailable

+ {{{unavailable_message}}} +
+{{/unavailable_message}} \ No newline at end of file diff --git a/platform/darwin/docs/theme/templates/doc.mustache b/platform/darwin/docs/theme/templates/doc.mustache index fc0f47532f..2a2050d306 100644 --- a/platform/darwin/docs/theme/templates/doc.mustache +++ b/platform/darwin/docs/theme/templates/doc.mustache @@ -43,6 +43,7 @@
{{^hide_name}}

{{name}}

{{/hide_name}} + {{> deprecation}} {{#declaration}}
diff --git a/platform/darwin/docs/theme/templates/task.mustache b/platform/darwin/docs/theme/templates/task.mustache index 4648327dc8..11646daa4b 100644 --- a/platform/darwin/docs/theme/templates/task.mustache +++ b/platform/darwin/docs/theme/templates/task.mustache @@ -15,7 +15,7 @@ - {{name}} + {{name}} {{#default_impl_abstract}} @@ -30,6 +30,7 @@
+ {{> deprecation}} {{#abstract}}
{{{abstract}}} -- cgit v1.2.1