-
Notifications
You must be signed in to change notification settings - Fork 427
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-1707 Dokka: adjust code area to new design #4051
base: master
Are you sure you want to change the base?
Conversation
1664937
to
452ece7
Compare
dokka-subprojects/plugin-base-frontend/src/main/ui-kit/code-block/styles.scss
Outdated
Show resolved
Hide resolved
dokka-subprojects/plugin-base-frontend/src/main/ui-kit/code-block/index.ts
Show resolved
Hide resolved
452ece7
to
8e46fde
Compare
c451df2
to
8f29739
Compare
padding: 7px var(--size-s3) 7px var(--size-s2); | ||
border-radius: var(--size-s1); | ||
border: 1px solid var(--color-w16); | ||
background: var(--color-background-page-dt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cursor: pointer; | ||
|
||
&:hover { | ||
background: var(--color-w50); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also add a certain style when this button is tapped on mobile according to design
https://www.figma.com/design/p5V2MV7znMxdVekniseQkA?node-id=22-7008#750370863
position: relative; | ||
padding: 12px 16px; | ||
border-radius: var(--size-s1); | ||
background-color: var(--color-background-code-block); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*/ | ||
.symbol:not(.token, .wrapped), code.block { | ||
display: block; | ||
box-sizing: border-box; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some stylelint warnings here that would be good to apply, most of them are regarding the property order and could be autofixed
const POPUP_TIMEOUT = 1200; | ||
|
||
document.addEventListener('click', function (event) { | ||
if (!(event.target instanceof Element)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this check? it might be always true
This PR has changes for adjust the code block and the tooltip for copy of code and links:
KTL-1698 Dokka: adjust inline code block
KTL-1704 Dokka: adjust tooltip style
Here's how it looks like.
Code blocks
https://github.com/user-attachments/assets/ed720b20-ae33-486f-8bbf-3c206428fbb1
Links tooltips
https://github.com/user-attachments/assets/95b55a86-c7c7-4c60-9766-f3c56dda6c51