Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Popup styling #882

Closed
buildersbrewery opened this issue Jun 22, 2016 · 7 comments
Closed

Popup styling #882

buildersbrewery opened this issue Jun 22, 2016 · 7 comments

Comments

@buildersbrewery
Copy link

https://www.sublimetext.com/3dev

Build 3116

  • Color Schemes: Added popupCss key, for defining default popup style sheets.
@equinusocio
Copy link
Member

equinusocio commented Jun 23, 2016

Yes. But i don't know where a how this popup appear. Mmmm

@buildersbrewery
Copy link
Author

This was in Sublime's default Monokai.tmTheme:

<dict>
    <key>settings</key>
    <array>
        <dict>
            <key>settings</key>
            <dict>
              <key>popupCss</key>
              <string><![CDATA[
    html {
        background-color: #404238;
        color: #F8F8F2;
    }
    a {
        color: #66D9EF;
    }
    .error, .deleted {
        color: #F92672;
    }
    .success, .inserted {
        color: #A6E22E;
    }
    .warning, .modified {
        color: #FD971F;
    }
              ]]></string>

...

Try a mouse hover over a function call in a Python script.

@equinusocio
Copy link
Member

equinusocio commented Jun 23, 2016

mmm nothing appens to me with:

#!/usr/bin/python

# Function definition is here
def printme( str ):
   "This prints a passed string into this function"
   print str
   return;

# Now you can call printme function
printme("I'm first call to user defined function!")
printme("Again second call to the same function")

@buildersbrewery
Copy link
Author

on_hover

@equinusocio
Copy link
Member

equinusocio commented Jun 23, 2016

mmmm I don't see anything lol. I don't know why. Even with monokay scheme and i have 31172016-06-23 16 34 31

@richardbporter
Copy link

I've got this issue as well. You may not see the popovers if you have "show_definitions": false set in your preferences.

@buildersbrewery
Copy link
Author

Sublime has popupCss as well as phantomCss now.

You can also use predefined variables as explained in the variables section on https://www.sublimetext.com/docs/3/minihtml.html. Compare below example (using Github's Primer palette of colors):

<key>phantomCss</key><string>
  html {
    background-color: #e1e1e1;
    color: #393939;

    --bg: #e1e1e1;
    --redish: #bd2c00;
    --orangish: #ed6a43;
    --yellowish: #ef9700;
    --greenish: #55a532;
    --cyanish: #0086b3;
    --bluish: #183691;
    --purplish: #a71d5d;
    --brownish: #693a17;
  }

  a {
    color: var(--cyanish);
    text-decoration: underline;
  }

  b, strong {
    font-weight: bold;
  }

  i, em {
    font-style: italic;
  }

  h1 {
    font-size: 2rem;
    border-bottom: 1px solid color(var(--bg) blend(#393939 3%));
  }

  h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid color(var(--bg) blend(#393939 3%));
  }

  h3 {
    font-size: 1.25rem;
  }

  .error, .deleted {
    background-color: color(var(--bg) blend(var(--redish) 50%));
  }

  .success, .inserted {
    background-color: color(var(--bg) blend(var(--greenish) 50%));
  }

  .warning, .modified {
    background-color: color(var(--bg) blend(var(--orangish) 50%));
  }
</string>
<key>popupCss</key><string>
  html {
    background-color: #e1e1e1;
    color: #393939;

    --bg: #e1e1e1;
    --redish: #bd2c00;
    --orangish: #ed6a43;
    --yellowish: #ef9700;
    --greenish: #55a532;
    --cyanish: #0086b3;
    --bluish: #183691;
    --purplish: #a71d5d;
    --brownish: #693a17;
  }

  a {
    color: var(--cyanish);
    text-decoration: underline;
  }

  b, strong {
    font-weight: bold;
  }

  i, em {
    font-style: italic;
  }

  h1 {
    font-size: 2rem;
    border-bottom: 1px solid color(var(--bg) blend(#393939 3%));
  }

  h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid color(var(--bg) blend(#393939 3%));
  }

  h3 {
    font-size: 1.25rem;
  }

  .error, .deleted {
    background-color: color(var(--bg) blend(var(--redish) 50%));
  }

  .success, .inserted {
    background-color: color(var(--bg) blend(var(--greenish) 50%));
  }

  .warning, .modified {
    background-color: color(var(--bg) blend(var(--orangish) 50%));
  }
</string>

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

No branches or pull requests

3 participants