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

fix: styles on .user-prompt-buttons #1323

Merged
merged 2 commits into from
May 8, 2023

Conversation

yanCode
Copy link
Contributor

@yanCode yanCode commented May 8, 2023

image

As in this snapshot, if you create empty prompts without editing the conent, nothing is wrong see A, but as long as you have long contents, well, the button groups starts displaying incorrectly, see B.

The reason is,

.user-prompt-header {
        max-width: calc(100% - 100px);
}

it only leaves 100px for the 3 buttons with full prompt contents. I don't think to reduce the max width of the content is a good idea, because we also need to display the content in mobile devices.

so the only way i can do is to slim the buttons, originally, each button has a padding of 10px, which takes up 20 px space, so i reduced it to padding: 7px;, not only that, i see the gap between two buttons from 5px to 2px.
by the way, I recommend using css properties of column-gap or row-gap in both flex and grid layouts , which is sightly better than

&:not(:last-child) {
            margin-right: 5px;
          }

also I commented out height: 100%;, if you need, you may change it back.

@Yidadaa
Copy link
Collaborator

Yidadaa commented May 8, 2023

LGTM, this style bug has been existing for a long time, thx.

@Yidadaa Yidadaa merged commit 4a17dca into ChatGPTNextWeb:main May 8, 2023
1 check failed
@yanCode yanCode deleted the fix/prompt-list-style branch May 13, 2023 00:54
Endlessworld pushed a commit to Endlessworld/ChatGPT-Next-Web that referenced this pull request May 17, 2023
…tyle

fix: styles on .user-prompt-buttons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants