Skip to content

Commit

Permalink
feat: rewamp link styles
Browse files Browse the repository at this point in the history
  • Loading branch information
nikpachoo committed Feb 6, 2025
1 parent 0e2415c commit 5b6890f
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@
--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 {
font: var(--font-text-m);
background-color: var(--color-background);
color: var(--text-color);
margin: 0;
}
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);
}
}

0 comments on commit 5b6890f

Please sign in to comment.