Giter VIP home page Giter VIP logo

Comments (7)

jwonyLee avatar jwonyLee commented on June 18, 2024 2

Hello, this comment can be a bit awkward using a translator. ;(
I think this problem is probably related to some styles in style.css.
Among them, it was confirmed that indentation occurs when the lower part is commented out. But I don't know which code specifically is causing the problem.

code {
    font-family: Consolas, 'Courier New', Courier, monospace;
    display: inline-block;
    overflow: auto !important;
    white-space: pre-line !important;       
    word-wrap: break-word !important;       
    padding: 2px 2px  2px 2px;
    vertical-align:middle;
    padding: 2px 2px 2px 2px;
    border: 1px solid var(--secondary-border-color);
    border-radius: 4px;
}

.regular-sans code {
    padding: 20px;
    background-color: var(--bg-sub);
    border-radius: 5px;
    border: none;
}

.serif code {
    padding: 20px;
    background-color: var(--bg-sub);
    border-radius: 5px;
    border: none;
}

pre code {
    font-family: Consolas, 'Courier New', Courier, monospace;
    display: inline-block;
    overflow: auto !important;
    white-space: pre-line !important;       
    word-wrap: break-word !important;       
    padding: 15px 15px  15px 15px;
    vertical-align:middle;
    width: 90%;
    background-color: var(--bg-sub);
    border: 1px solid var(--secondary-border-color);
    border-radius: 5px;
    color: var(--text-main);
}

Hope this comment helps you fix the issue.

from jekyll-garden.github.io.

gnuanu avatar gnuanu commented on June 18, 2024 2

Hello, this comment can be a bit awkward using a translator. ;( I think this problem is probably related to some styles in style.css. Among them, it was confirmed that indentation occurs when the lower part is commented out. But I don't know which code specifically is causing the problem.

Good catch @jwonyLee

I played with it a bit and figured removing white-space: pre-line !important; from both code and pre code fixes the issue.

from jekyll-garden.github.io.

LucaGaspa avatar LucaGaspa commented on June 18, 2024 1

It seems that no HTML space character is generated.

I have a small use case and the following workaround solved my problem, but I DO NOT RECOMMEND THIS APPROACH.

I managed to generate the missing spaces using the U+00a0 UTF-8 space character (opt + space in MacOS). In JSON code blocks it works fine, while in other code blocks it generates error spans as follows:

<span class="err">&nbsp;&nbsp;</span>

then in highligh.css you can find .highlight .err class and comment out the background-color attribute so you don't see the red background on indents.

from jekyll-garden.github.io.

oliwang avatar oliwang commented on June 18, 2024 1

Hello, this comment can be a bit awkward using a translator. ;( I think this problem is probably related to some styles in style.css. Among them, it was confirmed that indentation occurs when the lower part is commented out. But I don't know which code specifically is causing the problem.

Good catch @jwonyLee

I played with it a bit and figured removing white-space: pre-line !important; from both code and pre code fixes the issue.

Had the same issue. Commented out these two lines and the indentations are back. Thanks.

from jekyll-garden.github.io.

hfactor avatar hfactor commented on June 18, 2024

Hi, I get the problem. I will check if there is some available solution.

from jekyll-garden.github.io.

gnuanu avatar gnuanu commented on June 18, 2024

Another minor issue that bothered me was the color scheme used for the code blocks, which is not going well with dark mode. I fixed it by using the monokai color schme scss from here and replaced highligh.css with it.

The only caveat is, you'll end up with a dark color scheme for code blocks on both light and dark modes. But I can live with that. :)

from jekyll-garden.github.io.

hfactor avatar hfactor commented on June 18, 2024

@oliwang Yes. It worked. I have corrected this on the new version (check https://github.com/hfactor/hfactor.github.io). Will be updating upstream soon.

from jekyll-garden.github.io.

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.