GithubHelp home page GithubHelp logo

Comments (15)

lee-dohm avatar lee-dohm commented on June 8, 2024 4
atom-text-editor::shadow {
  .bracket-matcher .region {
    background-color: yellow;
    border: 1px solid black;
  }
}

from bracket-matcher.

danlshields avatar danlshields commented on June 8, 2024

I'm a little confused of how Atom works, because the class for the highlighted bracket doesn't appear in any .editor.lines.line. However, the above style actually does work (except the class is actually called bracket-matcher of course). I should have actually tried this beforehand.

You can style a small block under the bracket, but not the bracket itself.

from bracket-matcher.

majcherek2048 avatar majcherek2048 commented on June 8, 2024

Agree, It would be awesome to change color and font-weight of the actual bracket for highlighting, as many other editors do automatically (built-in/hardcoded in most).

from bracket-matcher.

InSuperposition avatar InSuperposition commented on June 8, 2024

👍

from bracket-matcher.

lee-dohm avatar lee-dohm commented on June 8, 2024

I feel like this revising of the Issue makes it a duplicate of atom/atom#2886. Essentially, the current Decorations API (and its precursors) can create layers over or under the text z-order-wise, but do not modify the classes of the text itself. Nor do they offer a means where an over layer can easily duplicate the text which it is obscuring in order to make it look like it is modifying the text.

So really, this is a bigger problem than just the bracket-matcher package.

from bracket-matcher.

bassu avatar bassu commented on June 8, 2024

+1

from bracket-matcher.

 avatar commented on June 8, 2024

+1
I would really benefit from this. I would make a yellow block around the matching bracket. The tiny blue underline is very hard to notice in a massive chunk of code.

from bracket-matcher.

lee-dohm avatar lee-dohm commented on June 8, 2024

@Lope You can make a yellow box around the matching bracket. You just can't change the style of the text itself.

from bracket-matcher.

 avatar commented on June 8, 2024

@lee-dohm great, how can I set a background color on the matching bracket? I've seen a few other people such as @majcherek2048 ask about this as well?

from bracket-matcher.

majcherek2048 avatar majcherek2048 commented on June 8, 2024

@Lope I was actually asking for a way to change the actual bracket. But cool @lee-dohm .. From now on I'll be using this 👍

from bracket-matcher.

 avatar commented on June 8, 2024

@lee-dohm Thank you, much appreciated!

@lee-dohm The last challenge is I'd like to style the color (text color) black so the bracket is still readable with the yellow background. I tried adding color:black !important; to your snippet but it didn't work.

I've tried to figure out what class/CSS-path to refer to... using view>Developer>Devtools but I don't understand atom's HTML layout. It's very strange.
Besides just telling me which class or CSS-path to target, can you please tell me how you discover the correct class/CSS-path?

This is what I did. I open Devtools, I click on the magnifyingglass in the top-right corner, then click on the selected, highlighted bracket. it only shows me this <span class="meta brace curly js">}</span> But there are a million of those, and the others are not selected. The nearby parent tags are not related to the bracket.

from bracket-matcher.

lee-dohm avatar lee-dohm commented on June 8, 2024

@Lope The last challenge is why this Issue is still marked as Open 😀

from bracket-matcher.

chl1996 avatar chl1996 commented on June 8, 2024

👍

from bracket-matcher.

 avatar commented on June 8, 2024

@lee-dohm I'd really appreciate a tip for finding the right class or CSS-path to be able to style the highlighted bracket's text-color?

from bracket-matcher.

majcherek2048 avatar majcherek2048 commented on June 8, 2024

@Lope Yes, we want that too, but it isn't currently possible, hence this issue is still open/unresolved. It's a feature we're still hoping/waiting for. If you find that you have the time and know-how, you could add it the code and make us all happy 😉

from bracket-matcher.

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.