Skip to content

Commit

Permalink
✨ feat(theme): better gray scales neutral color in theme settings
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Jun 30, 2023
1 parent 2b196fb commit cfb0e5a
Show file tree
Hide file tree
Showing 7 changed files with 381 additions and 306 deletions.
1 change: 0 additions & 1 deletion .stylelintignore

This file was deleted.

88 changes: 63 additions & 25 deletions javascript/main.js

Large diffs are not rendered by default.

40 changes: 24 additions & 16 deletions src/pages/Content/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ export const useStyles = createStyles(
}
}
}
[id$='_override_settings_row']:has(div.hidden) {
display: none;
}
.gradio-group:has(.gradio-group:has(div:empty)) {
display: none;
}
`,
draggableContainer: css`
.draggable-line {
Expand Down Expand Up @@ -229,22 +237,6 @@ export const useStyles = createStyles(
}
`,
textares: css`
#text2img_prompt,
#text2img_neg_prompt {
textarea {
min-height: ${TEXT2IMG_PROMPT_HEIGHT}px;
max-height: ${isPromptResizable ? 'unset' : `${TEXT2IMG_PROMPT_HEIGHT}px`};
}
}
#img2img_prompt,
#img2img_neg_prompt {
textarea {
min-height: ${IMG2IMG_PROMPT_HEIGHT}px;
max-height: ${isPromptResizable ? 'unset' : `${IMG2IMG_PROMPT_HEIGHT}px`};
}
}
[id$='2img_prompt'],
[id$='2img_neg_prompt'] {
textarea {
Expand Down Expand Up @@ -293,6 +285,22 @@ export const useStyles = createStyles(
font-family: ${token.fontFamilyCode};
}
}
#text2img_prompt,
#text2img_neg_prompt {
textarea {
min-height: ${TEXT2IMG_PROMPT_HEIGHT}px;
max-height: ${isPromptResizable ? 'unset' : `${TEXT2IMG_PROMPT_HEIGHT}px`};
}
}
#img2img_prompt,
#img2img_neg_prompt {
textarea {
min-height: ${IMG2IMG_PROMPT_HEIGHT}px;
max-height: ${isPromptResizable ? 'unset' : `${IMG2IMG_PROMPT_HEIGHT}px`};
}
}
`,
};
},
Expand Down
36 changes: 33 additions & 3 deletions src/slots/Setting/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,52 @@ export const useStyles = createStyles(({ css, token }) => ({
.ant-form-item {
margin: 0 !important;
}
.ant-form-item .ant-form-item-label > label {
height: unset;
}
.ant-row {
position: relative;
flex-wrap: nowrap;
}
.ant-form-item-label {
position: relative;
flex: 1;
max-width: 100%;
}
.ant-form-item-control {
position: relative;
flex: 0;
min-width: unset !important;
}
`,
formTitle: css`
position: relative;
display: flex;
flex-direction: column;
gap: 4px;
text-align: left;
> div {
font-weight: 500;
line-height: 1;
}
> small {
line-height: 1;
display: block;
line-height: 1.1;
color: ${token.colorTextDescription};
word-wrap: break-word;
white-space: pre-wrap;
}
`,
group: css`
overflow: hidden;
.ant-collapse-header {
background: ${token.colorFillTertiary};
border-radius: unset;
Expand Down
8 changes: 4 additions & 4 deletions src/styles/components/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ export default (token: Theme) => css`
}
tr {
&:nth-of-type(odd) td {
background: ${token.colorFillQuaternary};
}
&:hover td,
&:nth-of-type(odd):hover td {
background: ${token.colorFillSecondary};
}
&:nth-of-type(odd) td {
background: ${token.colorFillQuaternary};
}
}
`;
14 changes: 7 additions & 7 deletions src/styles/kitchenColors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ export const kitchenNeutral = {
dark: {
colorBgContainer: '#1f1f1f',
colorBgElevated: '#222',
colorBgLayout: '#111',
colorBgSpotlight: '#424242',
colorBorder: '#424242',
colorBorderSecondary: '#303030',
colorBgLayout: '#181818',
colorBgSpotlight: '#444',
colorBorder: '#444',
colorBorderSecondary: '#333',
colorFill: 'rgb(255 255 255 / 18%)',
colorFillQuaternary: 'rgb(255 255 255 / 4%)',
colorFillSecondary: 'rgb(255 255 255 / 12%)',
Expand All @@ -46,10 +46,10 @@ export const kitchenNeutral = {
light: {
colorBgContainer: '#fff',
colorBgElevated: '#fff',
colorBgLayout: '#f5f5f5',
colorBgLayout: '#f7f7f7',
colorBgSpotlight: 'rgb(0 0 0 / 85%)',
colorBorder: '#d9d9d9',
colorBorderSecondary: '#f0f0f0',
colorBorder: '#ddd',
colorBorderSecondary: '#eee',
colorFill: 'rgb(0 0 0 / 15%)',
colorFillQuaternary: 'rgb(0 0 0 / 2%)',
colorFillSecondary: 'rgb(0 0 0 / 6%)',
Expand Down
Loading

0 comments on commit cfb0e5a

Please sign in to comment.