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

more customisable padding #174

Open
jkoufalas opened this issue Feb 7, 2024 · 1 comment
Open

more customisable padding #174

jkoufalas opened this issue Feb 7, 2024 · 1 comment

Comments

@jkoufalas
Copy link

Hi

I love this package, its very useful. Thanks

Is there a way to use padding in a specific direction instead of the uniform padding prop whish applies the specified number on all sides.

I want to have padding on the left larger than top, bottom and right because I'm using showLineNumbers with rehypePrism which automatically sets my line numbers for each line and also accurately skips numbering a line for lines that go over multiple lines.

when I use CSS to add the line value as content before the line and shift that in front of the line, if there is no padding it will move off the area and not be visible. If I use a larger padding all these problems disappear and it visible and is much more simple to implement.

So, prop for padding be able to accept an array of numbers in the same order as CSS

e.g.
padding: "15px 15px 15px 30px", // top, right, bottom, left
and possible a single number if people want to keep it the same for all.

thanks
john

@jaywcjlove
Copy link
Member

@jkoufalas like this?

.w-tc-editor-preview, .w-tc-editor-text {
    padding-left: 32px !important;
}

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

No branches or pull requests

2 participants