Git Product home page Git Product logo

Comments (6)

weiweihuanghuang avatar weiweihuanghuang commented on June 24, 2024

Thanks for bringing this to my attention! The reason why it's happening is because there's kerning between /c (slash and c), so when <wbr /> is added, it breaks the kerning... If you check the fonts, the actual wbr character (U+200B) has no width.

This is a tricky one to be honest, you'll find this in other fonts too if you add a wbr character anywhere where there's normally kerning.

from work-sans.

TheJaredWilcurt avatar TheJaredWilcurt commented on June 24, 2024

Is there a way to combine WBR with the characters on both sides, like you would with f and i in a ligature?

from work-sans.

weiweihuanghuang avatar weiweihuanghuang commented on June 24, 2024

Not as a ligature but you could apply contextual kerning involving more than 2 glyphs. So technically in a way, but it would not make sense to do so performance wise.

What's the use case where you need to toggle WBR on and off?

from work-sans.

TheJaredWilcurt avatar TheJaredWilcurt commented on June 24, 2024

example

The file header has the name of the file path in full when the file is expanded, but is truncated when the file is collapsed.

from work-sans.

weiweihuanghuang avatar weiweihuanghuang commented on June 24, 2024

But why is the toggling of the WBR necessary for truncating and collapsing the text?

from work-sans.

TheJaredWilcurt avatar TheJaredWilcurt commented on June 24, 2024

It's the other way. When truncated I remove <wbr> so everything can be on one line. Including the icon in the middle of the line indicating a rename.

When it is expanded I show the entire filename text, and add in <wbr>/<wbr> around the slashes in the filename to improve readability with better line break opportunities.

from work-sans.

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.