Content width not set properly
See original GitHub issueEven though default styles were defined in PR#102, I’m still experiencing width setting issues:
Both rules added in that PR are set properly in the inline stylesheet but .gsc-comments
is still missing 1 or 2 pixels worth of padding-right
. Here’s a live demo if you need to give it a spin yourself.
Thanks 💪
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Height and width not working on CSS Content property
I am trying to achieve; a line before and after content spanned on entire width. The width and height properties do work, try...
Read more >width - CSS: Cascading Style Sheets - MDN Web Docs
The width CSS property sets an element's width. By default, it sets the width of the content area, but if box-sizing is set...
Read more >width | CSS-Tricks
The width property in CSS specifies the width of the element's content area. This "content" area is the portion inside the padding, border, ......
Read more >Setting Height And Width On Images Is Important Again
To prevent layout shifts and improve performance scores, we need to always set width and height attributes on our images.
Read more >HTML vs Body: How to Set Width and Height for Full Page Size
Not setting a width on the HTML and body elements will default to the full size of the screen. If you do set...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That fixes it indeed. Issue is also present on Microsoft Edge but not on Chromium nor Firefox Mobile. Don’t really have an idea if this is a browser or theme issue so not sure where to report it. I’ll close this issue for now.
@barnumbirr You’re not supposed to put the custom CSS for giscus on your website. The widget is loaded in an
<iframe>
so your styles won’t have any effect. You need to use a custom giscus theme via thedata-theme
attribute. The CSS that you put on your website can only be used to style the<div>
wrapper or the<iframe>
itself (useful for simple use cases e.g. limiting the height to make it scrollable), but not the<iframe>
's content, which is what’s necessary to apply thepadding-right: 1px
hack.If that’s too much hassle for you, try this in your
extra.css
instead:It’s probably a bug in either the Material MkDocs theme or Firefox, maybe you could open an issue there.