M: Minor style fixes

This commit is contained in:
Ivan 2024-10-03 16:26:00 +03:00
parent 0d11ddb68f
commit 92f495f5b8
7 changed files with 38 additions and 20 deletions

View File

@ -1,6 +1,9 @@
!! This is not complete list of TODOs !! !! This is not complete list of TODOs !!
For more specific TODOs see comments in code For more specific TODOs see comments in code
[Bugs - PENDING]
- Tab index still selecting background elements when modal is active
[Functionality - PROGRESS] [Functionality - PROGRESS]
- OSS change propagation: Advanced features - OSS change propagation: Advanced features

View File

@ -35,7 +35,7 @@ function ManualsPage() {
); );
return ( return (
<div className='flex mx-auto max-w-[80rem]' style={{ minHeight: mainHeight }}> <div className='flex mx-auto max-w-[80rem]' role='manuals' style={{ minHeight: mainHeight }}>
<TopicsList activeTopic={activeTopic} onChangeTopic={topic => onSelectTopic(topic)} /> <TopicsList activeTopic={activeTopic} onChangeTopic={topic => onSelectTopic(topic)} />
<ViewTopic topic={activeTopic} /> <ViewTopic topic={activeTopic} />
</div> </div>

View File

@ -12,7 +12,11 @@ interface ViewTopicProps {
function ViewTopic({ topic }: ViewTopicProps) { function ViewTopic({ topic }: ViewTopicProps) {
const { mainHeight } = useConceptOptions(); const { mainHeight } = useConceptOptions();
return ( return (
<AnimateFade key={topic} className='py-2 px-6 sm:px-12 overflow-y-auto' style={{ maxHeight: mainHeight }}> <AnimateFade
key={topic}
className='py-2 px-6 mx-auto sm:mx-0 lg:px-12 overflow-y-auto'
style={{ maxHeight: mainHeight }}
>
<TopicPage topic={topic} /> <TopicPage topic={topic} />
</AnimateFade> </AnimateFade>
); );

View File

@ -49,7 +49,7 @@ function EditorOssCard({ isModified, onDestroy, setIsModified }: EditorOssCardPr
/> />
<AnimateFade <AnimateFade
onKeyDown={handleInput} onKeyDown={handleInput}
className={clsx('md:w-fit md:max-w-fit max-w-[32rem]', 'mx-auto pt-[1.9rem]', 'flex flex-col md:flex-row px-6')} className={clsx('md:w-fit md:max-w-fit max-w-[32rem]', 'mx-auto pt-[1.9rem]', 'flex flex-row flex-wrap px-6')}
> >
<FlexColumn className='px-3'> <FlexColumn className='px-3'>
<FormOSS id={globals.library_item_editor} isModified={isModified} setIsModified={setIsModified} /> <FormOSS id={globals.library_item_editor} isModified={isModified} setIsModified={setIsModified} />

View File

@ -49,7 +49,7 @@ function EditorRSFormCard({ isModified, onDestroy, setIsModified }: EditorRSForm
/> />
<AnimateFade <AnimateFade
onKeyDown={handleInput} onKeyDown={handleInput}
className={clsx('md:w-fit md:max-w-fit max-w-[32rem] mx-auto', 'flex flex-col md:flex-row px-6 pt-[1.9rem]')} className={clsx('md:w-fit md:max-w-fit max-w-[32rem] mx-auto', 'flex flex-row flex-wrap px-6 pt-[1.9rem]')}
> >
<FlexColumn className='flex-shrink'> <FlexColumn className='flex-shrink'>
<FormRSForm id={globals.library_item_editor} isModified={isModified} setIsModified={setIsModified} /> <FormRSForm id={globals.library_item_editor} isModified={isModified} setIsModified={setIsModified} />

View File

@ -8,6 +8,14 @@
--font-main: 'Rubik', 'Noto Color Emoji', 'Fira Code', 'Noto Sans Math', 'Noto Sans Symbols 2', 'Segoe UI Symbol', sans-serif; --font-main: 'Rubik', 'Noto Color Emoji', 'Fira Code', 'Noto Sans Math', 'Noto Sans Symbols 2', 'Segoe UI Symbol', sans-serif;
--font-math: 'Fira Code', 'Noto Sans Math', 'Noto Sans Symbols 2', 'Rubik', 'Noto Color Emoji', 'Segoe UI Symbol', sans-serif; --font-math: 'Fira Code', 'Noto Sans Math', 'Noto Sans Symbols 2', 'Rubik', 'Noto Color Emoji', 'Segoe UI Symbol', sans-serif;
/* Numeric parameters */
--font-size-base: 16px;
--font-size-sm: 12px;
--line-height: 1.5;
--text-max-width: 75ch;
--scroll-padding: 3rem;
/* Light Theme */ /* Light Theme */
--cl-bg-120: hsl(000, 000%, 100%); --cl-bg-120: hsl(000, 000%, 100%);
--cl-bg-100: hsl(000, 000%, 098%); --cl-bg-100: hsl(000, 000%, 098%);

View File

@ -8,22 +8,23 @@
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
html, html {
body { -webkit-text-size-adjust: none;
-webkit-text-size-adjust: 100%; -moz-text-size-adjust: none;
text-size-adjust: none;
width: 100%; hanging-punctuation: first last;
height: 100%; color-scheme: dark light;
/* interpolate-size: allow-keywords; */
}
body {
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
overflow-x: hidden; overflow-x: hidden;
} }
html {
hanging-punctuation: first last;
color-scheme: dark light;
}
[data-color-scheme='dark'] { [data-color-scheme='dark'] {
color-scheme: dark; color-scheme: dark;
} }
@ -36,13 +37,13 @@ html {
@media (prefers-reduced-motion: no-preference) { @media (prefers-reduced-motion: no-preference) {
:has(:target) { :has(:target) {
scroll-behavior: smooth; scroll-behavior: smooth;
scroll-padding-top: 3rem; scroll-padding-top: var(--scroll-padding);
} }
} }
:root { :root {
font-size: 16px; font-size: var(--font-size-base);
line-height: 24px; line-height: var(--line-height);
font-family: var(--font-main); font-family: var(--font-main);
color: var(--cl-fg-100); color: var(--cl-fg-100);
@ -58,8 +59,7 @@ html {
@media only screen and (max-width: 639px) { @media only screen and (max-width: 639px) {
:root { :root {
font-size: 12px; font-size: var(--font-size-sm);
line-height: 18px;
} }
} }
@ -104,7 +104,7 @@ h6 {
/* Limit text lines and setup wrapping */ /* Limit text lines and setup wrapping */
p, p,
li { li {
max-width: 75ch; max-width: var(--text-max-width);
text-wrap: pretty; text-wrap: pretty;
} }
@ -119,6 +119,9 @@ div:not(.dense) > p {
h2 { h2 {
@apply [&:not(:first-child)]:mt-2 font-semibold text-center; @apply [&:not(:first-child)]:mt-2 font-semibold text-center;
[role='manuals'] & {
@apply [&:not(:first-child)]:mt-3 mb-2;
}
} }
b { b {