Giter Club home page Giter Club logo

Comments (3)

riggraz avatar riggraz commented on May 26, 2024 1

I think the problem is due to the CSS rule width: fit-content in the wrapper div. I'll take a look into it and fix it

from no-style-please.

marcelo57 avatar marcelo57 commented on May 26, 2024 1

hello, I just tried it and its works fine on my side too
I just use the code blocks for the way they look on the page haha, but i apreacciated it
thanks for fixing it, this is a great theme
gracias

from no-style-please.

riggraz avatar riggraz commented on May 26, 2024

I investigated a bit and that's what I found.

First of all, the problem has nothing to do with dark mode since it also occurs in light mode. Moreover, in my tests this problem occured only in Chrome and Safari.

It has to do with <code> tags that don't seem to work as expected. All other elements (images, blockquotes, tables, ...) respect the size of the parent wrapper div (<div class="w">), but <code> doesn't. It takes up all the width necessary to render its longest line, up to a max width of 640px (defined again in the wrapper div).

This surely has something to do with the wrapper div style: width: fit-content. Removing that line solves the problem, but brings some inconveniences so I don't want to change it.

Instead I added white-space: pre-wrap to the style of <code> elements. This solves the problem but has the incovenience that now lines in blocks wrap if they're too long. Not the best imo but it's okay for now.

from no-style-please.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.