Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature Request: code view needs to colorize bold & italics #77

Open
andrewconnell opened this issue Mar 10, 2015 · 1 comment
Open

Comments

@andrewconnell
Copy link

Currently the code view colorizes a lot of things, but haven't found a way to configure it to make bold or italics text stand out when looking at the markup. We get colors with links, code, headings... this would be nice to have.

@KPhoenix
Copy link

If I'm understanding your request correctly, this is actually an issue for theme developers rather than extension developers. I guess since bold/italic styles aren't used in coding or scripting languages most of the time, the devs might forget that they are used in Markdown when they're choosing colors for their themes. (For what it's worth, Brackets itself is supposed to have bold text appear in boldface and italic text appear slanted, which would at least be something even without color, but apparently there's an issue with that and they've overridden it for now.) I would mention this request to the creator(s) of your favorite theme/themes, but in the meantime you can fix it yourself:

  1. Open your Brackets Extensions folder (Help > Show Extensions Folder), enter the "user" folder and find the theme you're currently using.
  2. Open the theme's "main.less" file.
  3. Somewhere inside that file—you may be able to skim through it and find a place that looks like it fits, but it shouldn't generally matter—paste the following (change the hex colors to whatever looks good with that theme):
span.cm-em {
    font-style: italic;
    color: #9598D6;
}
span.cm-strong {
    font-weight: 600;
    color: #826BBA;
}
span.cm-emstrong {
    font-style: italic;
    font-weight: 600;
    color: #826BBA;
}

Save the file and you should see properly highlighted bold/italic text if you open a Markdown file in Brackets while using that theme. :) The font-style and font-weight are optional if the issue the Brackets devs found bothers you as well.

It's not a perfect solution since a) you have to do it manually for any themes you want to use and b) if the creator updates the theme your changes will probably be overwritten, so you'll have to apply them again, but it does work. If you reach out to the creator of your theme they might make the color/style changes themselves, and that way the colors will be available for everyone and won't be overwritten by theme updates.

I've been wanting bold/italic highlighting for a good while and only recently found the styles I needed to change to make them work, haha. I hope this helps you, too!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants