Skip to content

Commit 519c2df

Browse files
authored
New applies_to tags styling (#1487)
* New `applies_to` tags styling * Add EDOT descriptions * Add descriptions for apm agents * Fix test * Spacing adjustments * Run prettier
1 parent 1440a52 commit 519c2df

File tree

10 files changed

+250
-133
lines changed

10 files changed

+250
-133
lines changed

docs/syntax/applies.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,37 @@ applies_to:
422422

423423
This allows you to annotate various facets as defined in [](../migration/versioning.md)
424424

425-
## Inline Examples
425+
## Look and feel
426426

427-
### Stack
427+
### Block
428+
429+
```{applies_to}
430+
stack: preview 9.1
431+
serverless: planned
432+
433+
apm_agent_dotnet: ga 1.0.0
434+
apm_agent_java: beta 1.0.0
435+
edot_dotnet: preview 1.0.0
436+
edot_python:
437+
edot_node: ga 1.0.0
438+
elasticsearch: preview 9.0.0
439+
security: removed 9.0.0
440+
observability: deprecated 9.0.0
441+
```
442+
443+
### Inline
444+
445+
#### In text
446+
447+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ut libero diam. Mauris sed eleifend erat,
448+
sit amet auctor odio. Donec ac placerat nunc. {applies_to}`stack: preview` Aenean scelerisque viverra lectus
449+
nec dignissim. Vestibulum ut felis nec massa auctor placerat. Maecenas vel dictum.
450+
451+
- {applies_to}`elasticsearch: preview` Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ut libero diam. Mauris sed eleifend erat, sit amet auctor odio. Donec ac placerat nunc.
452+
- {applies_to}`observability: preview` Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ut libero diam.
453+
- {applies_to}`security: preview` Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ut libero diam. Mauris sed eleifend erat, sit amet auctor odio. Donec ac placerat nunc. Aenean scelerisque viverra lectus nec dignissim.
454+
455+
#### Stack
428456

429457
| `applies_to` | result |
430458
|--------------------------------------------|--------------------------------------|
@@ -455,7 +483,7 @@ This allows you to annotate various facets as defined in [](../migration/version
455483
| `` {applies_to}`stack: removed 9.1` `` | {applies_to}`stack: removed 9.1` |
456484
| `` {applies_to}`stack: removed 99.0` `` | {applies_to}`stack: removed 99.0` |
457485

458-
### Serverless
486+
#### Serverless
459487

460488
| `applies_to` | result |
461489
|-------------------------------------------------|-------------------------------------------|

docs/testing/req.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
1+
---
2+
applies_to:
3+
stack: preview 9.0, ga 9.1
4+
---
5+
16
# Requirements
27

8+
```{applies_to}
9+
stack: preview 9.0, ga 9.1
10+
```
11+
12+
13+
{applies_to}`stack: preview 9.0` This tutorial is based on Elasticsearch 9.0.
14+
This tutorial is based on Elasticsearch 9.0. This tutorial is based on Elasticsearch 9.0.
15+
This tutorial is based on Elasticsearch 9.0.
16+
17+
what
18+
19+
320
To follow this tutorial you will need to install the following components:
421

22+
23+
524
- An installation of Elasticsearch, based on our hosted [Elastic Cloud](https://www.elastic.co/cloud) service (which includes a free trial period), or a self-hosted service that you run on your own computer. See the Install Elasticsearch section above for installation instructions.
625
- A [Python](https://python.org) interpreter. Make sure it is a recent version, such as Python 3.8 or newer.
726

Lines changed: 30 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,48 @@
11
@layer components {
2-
.applies,
3-
.applies-inline {
2+
.applies {
43
cursor: default;
54

5+
@apply text-subdued;
6+
67
[data-tippy-content]:not([data-tippy-content='']) {
7-
cursor: help;
8-
border-radius: 9999px;
9-
&:hover {
10-
text-decoration: underline;
11-
}
8+
@apply cursor-help;
129
}
1310

14-
.applicable-meta-removed {
15-
color: var(--color-red-90);
16-
}
17-
.applicable-meta-ga {
18-
color: var(--color-green-90);
19-
}
20-
.applicable-meta-technical-preview {
21-
color: var(--color-blue-elastic-80);
22-
}
23-
.applicable-meta-deprecated {
24-
color: var(--color-pink-90);
11+
.applicable-info {
12+
@apply border-grey-20 inline-grid cursor-default grid-cols-[auto_1fr_auto] rounded-full border-[1px] bg-white pt-1.5 pr-3 pb-1.5 pl-3;
2513
}
26-
.applicable-meta-beta {
27-
color: var(--color-poppy-90);
14+
15+
.applicable-name,
16+
.applicable-meta {
17+
@apply text-xs text-nowrap;
2818
}
29-
.applicable-meta-planned {
30-
color: var(--color-grey-90);
19+
20+
.applicable-separator {
21+
width: 1px;
22+
height: 100%;
23+
background-color: var(--color-grey-20);
24+
margin-left: calc(var(--spacing) * 2);
25+
margin-right: calc(var(--spacing) * 2);
3126
}
3227
}
3328

34-
.applies {
35-
@apply font-sans;
36-
border-bottom: 1px solid var(--color-grey-20);
37-
padding-bottom: calc(var(--spacing) * 3);
38-
font-variant: all-petite-caps;
29+
.applies.applies-block {
30+
@apply border-b-grey-20 flex flex-wrap gap-2 border-b-1 pb-4;
31+
}
3932

40-
.applicable-info {
41-
padding: calc(var(--spacing) * 0.5);
42-
padding-left: calc(var(--spacing) * 2);
43-
padding-right: calc(var(--spacing) * 2);
44-
margin: calc(var(--spacing) * 0.5);
45-
display: inline-block;
46-
font-size: 0.8em;
47-
border-radius: 0.4em;
48-
background-color: var(--color-white);
49-
border: 1px solid var(--color-grey-20);
50-
}
51-
.applicable-version {
52-
font-weight: bold;
53-
margin-left: calc(var(--spacing) * 0.5);
54-
font-variant: none;
55-
font-size: 0.87em;
33+
.applies.applies-inline {
34+
display: inline-block;
35+
vertical-align: bottom;
36+
.applicable-separator {
37+
margin-left: calc(var(--spacing) * 1.5);
38+
margin-right: calc(var(--spacing) * 1.5);
5639
}
57-
.applicable-lifecycle {
58-
font-weight: bold;
59-
}
60-
}
61-
.applies-inline {
62-
@apply font-sans;
63-
font-variant: all-petite-caps;
6440
.applicable-info {
65-
cursor: default;
66-
padding: calc(var(--spacing) * 0.5);
67-
padding-left: calc(var(--spacing) * 2);
68-
padding-right: calc(var(--spacing) * 2);
69-
margin-left: calc(var(--spacing) * 0.5);
70-
margin-right: calc(var(--spacing) * 0.5);
71-
display: inline-block;
72-
font-size: 0.8em;
73-
border-radius: 0.4em;
74-
background-color: var(--color-white);
75-
border: 1px solid var(--color-grey-20);
76-
font-weight: normal;
77-
}
78-
.applicable-version {
79-
font-weight: bold;
80-
margin-left: calc(var(--spacing) * 0.5);
81-
font-variant: none;
82-
font-size: 0.87em;
41+
@apply rounded-sm pt-1 pr-1.5 pb-1 pl-1.5;
8342
}
84-
.applicable-lifecycle {
85-
font-weight: bold;
43+
.applicable-name,
44+
.applicable-meta {
45+
font-size: 0.65em;
8646
}
8747
}
8848
}

src/Elastic.Documentation.Site/Assets/theme.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
--color-ink: #343741;
2424
--color-ink-light: #535966;
2525
--color-ink-dark: #1c1e23;
26+
--color-subdued: #516381;
2627

2728
--color-blue-sky: #36b9ff;
2829
--color-blue-midnight: #20377d;

0 commit comments

Comments
 (0)