From 44168e8c0c650c4b27790ea785c537acf35fda16 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 6 Feb 2018 17:52:42 +0100 Subject: [PATCH] better styling for deprecated api items * Adds a dotted underline to the `Deprecated` markers. Those can be hovered to see more information about the deprecation / deletion. * Fixes that the deprecation markers are too big and are not looking good in the API table * Adds a line through property names that are also deprecated. This makes it clear that this API is deprecated and also looks pretty good. References https://github.com/angular/material2/pull/9648 --- .../pages/component-viewer/component-api.scss | 4 ---- src/styles/_api.scss | 19 ++++++++++++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/app/pages/component-viewer/component-api.scss b/src/app/pages/component-viewer/component-api.scss index 3a09d74df..090f65e4e 100644 --- a/src/app/pages/component-viewer/component-api.scss +++ b/src/app/pages/component-viewer/component-api.scss @@ -34,10 +34,6 @@ line-height: 24px; } -.docs-api-class-deprecated-marker { - font-weight: bold; -} - .docs-api-property-type { font-weight: bold; font-size: 14px; diff --git a/src/styles/_api.scss b/src/styles/_api.scss index 03faf3990..bfb853928 100644 --- a/src/styles/_api.scss +++ b/src/styles/_api.scss @@ -56,7 +56,8 @@ } .docs-api-input-marker, -.docs-api-output-marker { +.docs-api-output-marker, +.docs-api-deprecated-marker { // Size corresponding to "caption"-style text in the spec. font-size: 12px; } @@ -67,3 +68,19 @@ font-family: 'Roboto Mono', monospace; padding: 3px; } + +.docs-api-deprecated-marker, +.docs-api-class-deprecated-marker, +.docs-api-interface-deprecated-marker { + display: inline-block; + font-weight: bold; + + &[title] { + border-bottom: 1px dotted grey; + cursor: help; + } +} + +.docs-api-deprecated-marker + .docs-api-property-name { + text-decoration: line-through; +}