Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ktl-1702 Adjust link style #4020

Merged
merged 6 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions dokka-subprojects/plugin-base-frontend/src/main/ui-kit/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,23 @@
--color-background: var(--color-background-page);
--focus-outline: 4px solid var(--color-key-blue-50);
--content-max-width: 1128px;
--text-color: var(--color-text);
--text-outine: var(--color-b20);
nikpachoo marked this conversation as resolved.
Show resolved Hide resolved
}

.theme-dark {
--color-background: var(--color-background-page-dt);
--text-color: var(--color-text-dt);
--text-outine: var(--color-w16);
nikpachoo marked this conversation as resolved.
Show resolved Hide resolved
}

body,
table {
body {
nikpachoo marked this conversation as resolved.
Show resolved Hide resolved
font: var(--font-text-m);
background-color: var(--color-background);
color: var(--text-color);
margin: 0;
}

small {
font: var(--font-text-s);
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import * as platformTag from './platform-tag/index';
import * as platformTags from './platform-tags/index';
import * as tabs from './tabs/index';
import * as tocTree from './toc-tree/index';
import * as link from './link/index';
import { removeBackwardCompatibilityStyles } from './utils';
import './helpers.scss';
import './global.scss';
Expand All @@ -36,6 +37,7 @@ export {
platformTags,
tabs,
tocTree,
link,
};

document.addEventListener('DOMContentLoaded', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
* Copyright 2014-2025 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
import './styles.scss';
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*!
* Copyright 2014-2025 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
@import '../_tokens/index';

a {
text-decoration: none;
}

/** [data-name] - anchor links with no size **/
.main-content a:not([data-name]) {
outline: none;
cursor: pointer;
font-style: normal;
font-size: inherit;
line-height: inherit;
transition: color 200ms, border-color 200ms;
overflow-wrap: break-word;
word-break: break-word;
padding-bottom: 1px;
border-bottom: 1px solid var(--text-outine);

&, &:active, &:focus, &:hover {
color: var(--text-color);
text-decoration: none;
}

&:hover {
border-bottom-color: var(--text-color);
}

&:focus {
box-shadow: 0 0 0 4px var(--color-key-blue-50);
nikpachoo marked this conversation as resolved.
Show resolved Hide resolved
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
--default-font-color: rgb(0, 0, 0);
--header-font-color: var(--default-font-color);

--breadcrumb-font-color: #637282;
nikpachoo marked this conversation as resolved.
Show resolved Hide resolved
--breadcrumb-margin: 24px;
--hover-link-color: #5B5DEF;

Expand All @@ -23,7 +22,7 @@
--color-dark: #27282c;
--default-font-family: JetBrains Sans, Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue, Arial, sans-serif;
--default-monospace-font-family: JetBrains Mono, SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;
--default-font-size: 15px;
--default-font-size: 16px;
--average-color: var(--color-dark);
--brief-color: var(--average-color);
--copy-icon-color: rgba(39, 40, 44, .7);
Expand Down Expand Up @@ -80,15 +79,6 @@ html, body {
/* /--- root styles --- */

/* --- global tags styles --- */
body, table {
background: var(--background-color);
font-family: var(--default-font-family);
font-style: normal;
font-weight: normal;
font-size: var(--default-font-size);
line-height: 1.6;
margin: 0;
}

h1 {
font-size: 40px;
Expand All @@ -112,10 +102,6 @@ p, ul, ol, table, pre, dl {
margin: 0;
}

a {
text-decoration: none;
}

u {
text-decoration: none;
padding-bottom: 2px;
Expand Down Expand Up @@ -148,10 +134,6 @@ img {
max-width: 100%;
}

small {
font-size: 11px;
}
nikpachoo marked this conversation as resolved.
Show resolved Hide resolved

table {
width: 100%;
border-collapse: collapse;
Expand Down Expand Up @@ -213,7 +195,6 @@ td:first-child {
--default-font-color: rgba(255, 255, 255, 0.96);
--border-color: hsla(0, 0%, 100%, 0.2);
--code-background: hsla(0, 0%, 100%, 0.05);
--breadcrumb-font-color: #8c8c8e;
--brief-color: hsla(0, 0%, 100%, 0.4);
--copy-icon-color: hsla(0, 0%, 100%, 0.6);
--copy-icon-hover-color: #fff;
Expand Down Expand Up @@ -246,7 +227,6 @@ td:first-child {
/* /--- Breadcrumbs styles --- */
.breadcrumbs, .breadcrumbs a, .breadcrumbs a:hover {
margin-top: var(--breadcrumb-margin);
color: var(--breadcrumb-font-color);
overflow-wrap: break-word;
}

Expand Down Expand Up @@ -398,10 +378,6 @@ code:not(.block) {
vertical-align: bottom;
}

.symbol > a {
color: var(--hover-link-color);
}
nikpachoo marked this conversation as resolved.
Show resolved Hide resolved

.copy-icon {
cursor: pointer;
}
Expand Down Expand Up @@ -537,30 +513,6 @@ h1.cover {
}
}

.main-content a:not([data-name]) {
padding-bottom: 2px;
border-bottom: 1px solid var(--border-color);
cursor: pointer;
text-decoration: none;
color: inherit;
font-size: inherit;
line-height: inherit;
transition: color .1s, border-color .1s;
overflow-wrap: break-word;
word-break: break-word;
}

.main-content a:hover {
border-bottom-color: unset;
color: inherit
}

a small {
font-size: 11px;
margin-top: -0.6em;
display: block;
}
nikpachoo marked this conversation as resolved.
Show resolved Hide resolved

p.paragraph img {
display: block;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2481,6 +2481,105 @@ button.platform-tag:focus-visible {
--rotate-transition:transform 200ms ease-in-out;
}

a {
text-decoration: none;
}

.main-content a:not([data-name]) {
cursor: pointer;
font-size: inherit;
font-style: normal;
line-height: inherit;
outline: none;
transition: color 0.2s, border-color 0.2s;
word-wrap: break-word;
border-bottom: 1px solid var(--text-outine);
padding-bottom: 1px;
word-break: break-word;
}

.main-content a:not([data-name]), .main-content a:not([data-name]):active, .main-content a:not([data-name]):focus, .main-content a:not([data-name]):hover {
color: var(--text-color);
text-decoration: none;
}

.main-content a:not([data-name]):hover {
border-bottom-color: var(--text-color);
}

.main-content a:not([data-name]):focus {
box-shadow: 0 0 0 4px rgba(48, 127, 255, 0.5);
box-shadow: 0 0 0 4px var(--color-key-blue-50);
}
:root {
--breakpoint-desktop-min:900px;
--breakpoint-tablet-max:899px;
--breakpoint-tablet-min:440px;
--breakpoint-mobile-max:439px;
--breakpoint-mobile-min:360px;
--color-key-blue:#307fff;
--color-key-blue-50:rgba(48,127,255,.5);
--color-background-nav:#27282c;
--color-background-nav-dt:#323237;
--color-background-page:#fff;
--color-background-page-dt:#262628;
--color-background-footer:#ebebeb;
--color-background-footer-dt:#323237;
--color-text:#000;
--color-text-dt:hsla(0,0%,100%,.96);
--color-text-light:rgba(0,0,0,.7);
--color-text-light-dt:hsla(0,0%,100%,.7);
--color-w05:hsla(0,0%,100%,.05);
--color-w08:hsla(0,0%,100%,.08);
--color-w10:hsla(0,0%,100%,.1);
--color-w16:hsla(0,0%,100%,.16);
--color-w50:hsla(0,0%,100%,.5);
--color-w70:hsla(0,0%,100%,.7);
--color-w80:hsla(0,0%,100%,.8);
--color-w100:#fff;
--color-b05:rgba(0,0,0,.05);
--color-b08:rgba(0,0,0,.08);
--color-b20:rgba(0,0,0,.2);
--color-b50:rgba(0,0,0,.5);
--color-b70:rgba(0,0,0,.7);
--color-cd-punctuation:#999;
--color-cd-keyword:#0033b3;
--color-cd-keyword-alternative:#cc7832;
--color-cd-builtin:#067d17;
--color-cd-builtin-alternative:#e7bf6a;
--color-cd-function:#00627a;
--color-cd-function-alternative:#ffc66d;
--color-cd-operator:#9a6e3a;
--color-cd-operator-alternative:#a9b7c6;
--color-cd-body:#000;
--color-cd-body-alternative:#a9b7c6;
--color-generic:#539df3;
--color-jvm:#4dbb5f;
--color-js:#ffc700;
--color-wasm:#fff;
--size-s1:4px;
--size-s2:8px;
--size-s3:16px;
--size-m1:24px;
--size-m2:32px;
--size-m3:48px;
--size-l1:64px;
--size-l2:72px;
--size-ta1:40px;
--size-ta2:52px;
--font-family-default:JetBrains Sans,Inter,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Droid Sans,Helvetica Neue,Arial,sans-serif;
--font-family-mono:JetBrains Mono,SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;
--font-h1:600 44px/44px var(--font-family-default);
--font-h2:600 32px/32px var(--font-family-default);
--font-h3:600 24px/24px var(--font-family-default);
--font-h4:600 16px/24px var(--font-family-default);
--font-text-m:400 16px/24px var(--font-family-default);
--font-text-s:400 14px/20px var(--font-family-default);
--font-code:400 16px/24px var(--font-family-mono);
--hover-transition:background-color 200ms ease-in-out;
--rotate-transition:transform 200ms ease-in-out;
}

@media (max-width: 899px) {
.ui-kit_desktop-only {
display: none;
Expand Down Expand Up @@ -2561,13 +2660,27 @@ button.platform-tag:focus-visible {
--color-background:var(--color-background-page);
--focus-outline:4px solid var(--color-key-blue-50);
--content-max-width:1128px;
--text-color:var(--color-text);
--text-outine:var(--color-b20);
}

.theme-dark {
--color-background:var(--color-background-page-dt);
--text-color:var(--color-text-dt);
--text-outine:var(--color-w16);
}

body, table {
body {
background-color: #fff;
background-color: var(--color-background);
color: #000;
color: var(--text-color);
font: 400 16px/24px JetBrains Sans, Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, Oxygen, Droid Sans, Helvetica Neue, Arial;
font: var(--font-text-m);
margin: 0;
}

small {
font: 400 14px/20px JetBrains Sans, Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, Oxygen, Droid Sans, Helvetica Neue, Arial;
font: var(--font-text-s);
}

Large diffs are not rendered by default.

Loading