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

[discussion] Changing style of code blocks #998

Closed
4 tasks done
jd-solanki opened this issue Jul 16, 2022 · 2 comments
Closed
4 tasks done

[discussion] Changing style of code blocks #998

jd-solanki opened this issue Jul 16, 2022 · 2 comments
Labels
enhancement New feature or request stale theme Related to the theme

Comments

@jd-solanki
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Hi, When I was checking my libs docs in mobile I found that in mobile there's no border-radius and code block hits the border of mobile (due to negative margin on left & right).

image

Later I found that it is intentional and VuePress is also doing the same.

However, I want to point out where it fails.

If we have indented code block then it looks like this:

image

1. Remove anu plugin use in `main.js` file if you haven't

    ```diff
    -  import { anu } from 'anu-vue'

      createApp(App)
    -   .use(anu)
        .mount('#app')
    ```

Describe the solution you'd like

  1. Remove the negative margins
  2. Remove breakpoint for adding border-radisu (apply border radius on all screens)

Describe alternatives you've considered

Revering styles:

.vp-doc div[class*='language-']:not(:where(.vp-raw *)) {
    border-radius: 8px !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

Additional context

This is how it looks with the new UI:

image

image

It aligns perfectly with the content ❤️

Validations

@brc-dd brc-dd added bug Something isn't working theme Related to the theme labels Jul 16, 2022
@brc-dd
Copy link
Member

brc-dd commented Jul 16, 2022

Ah, this issue is also on https://vitepress.vuejs.org/guide/deploying.html

Later I found that it is intentional and VuePress is also doing the same.

Yeah it was to create more space. But its messing with indented code blocks.

@yyx990803 yyx990803 added enhancement New feature or request and removed bug Something isn't working labels Mar 13, 2023
@yyx990803
Copy link
Member

I don't necessarily consider this a bug - the style looks fine to me, and it separates indented vs. non-indented code blocks. It could be more of a personal preference.

@github-actions github-actions bot added the stale label Aug 3, 2023
@brc-dd brc-dd closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request stale theme Related to the theme
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants