"Show applied styles for tag" not working

Hi,

I brought up this issue (Show Applied Styles For Tag) about a year ago and was told it would be fixed in 2.0.1. I went to your bug base and see that it is indeed marked as fixed. (http://youtrack.jetbrains.net/issue/RUBY-5588).

I'm using 2.0.2 (which, by the way, I love - thank you!) and it doesn't appear to be working. When I right-click a simple element like <p id='chooser'> the CSS Style window opens (with the right title containing the .erb file and style element) but there's nothing in it. Both the window on the left (the actual styles) and the one on the right (source preview) are empty.

Here are the corresponding style definitions from my CSS file:
p#chooser select,
p#chooser input {
  margin-right: 10px;
}

As you can see, it's nothing fancy, but perhaps the fact that there's two of them followed by a child element is throwing things off?

Thanks,
Larry

6 comments
Comment actions Permalink

Hello Larry,

I've just discovered that Safary and rails renders similar file a bit differently.

rm_show_applied_css.png

On the screenshot foo.html.erb and foo1.html are almost equal. I've asked RM to show applied styles for "p", "input" and "select" tags.
RM show the same settings as if I opened file in Safary. And rails 2.3.5 created incorrect html for it:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title>People: foo</title>
  <link href="/stylesheets/scaffold.css?1275232414" media="screen" rel="stylesheet" type="text/css" />
</head>
<body>

<p ></p>
<p id="chooser" class='chooser' ></p>


<p id="chooser"><b>First name:</b><br>
  <input type="text" name="first_name" value="Larry">
</p>
<p id="chooser"><b>Last name:</b><br>
  <input type="text" name="last_name" value="Hannay"> <br>
  <select>
    <option>fix</option>
    <option>won't fix</option>
  </select>
</p>

<style type="text/css">
    body {
        color: red;
    }
 </style>

</body>
</html>

0
Comment actions Permalink

Hi Roman,

Thanks for looking into this. Unfortunately, I'm not sure what you are saying because when I click on the image I can't get it to a point where I can make anything out.

-- Larry

0
Comment actions Permalink

Ok, on screenshot:

1. There are 3 files opened in editor:
   boo.css - similar to your CSS example
   foo1.html, foo.html.erb - both files describe the same HTML page and use boo.css file

2. At the bottom you can notice 2 Safary windows. I opened foo1.html page directly in Safary and also ask rails application to render and open foo.html.erb in another Safary window. I attached source of html paged generated by rails to the previous post.

3. At the right side of screenshot you can see results of "Show applied styles for tag" action, which I invoked on "p", "input" and "select" tags of foo.html.erb file (you suppose that this feature doesn't work =) ). These windows are tabs in "Css Styles" tool window and I only made them "float"

And now notice:
1. the difference between to Safary windows .
2. "Show applied styles for tag" action works for *.erb files (at least in RubyMine 2.5) and RubyMine displays right result

0
Comment actions Permalink

Oooooh... Okay. I'm sorry you had to type all of that out, Roman. (I also tried zooming in with my browser but that didn't work.) Anyway, I appreciate your taking the time to provide an explanation.

Now quit working on Sunday!

Thanks again,
Larry

0
Comment actions Permalink

Oooooh... Okay. I'm sorry you had to type all of that out, Roman. (I also tried zooming in with my browser but that didn't work.) Anyway, I appreciate your taking the time to provide an explanation.

In my browser it zooms on mouse click. Try direct link on the screenshot

Now quit working on Sunday!

But it is almost Monday in my time zone

0
Comment actions Permalink

Then you should go to bed and get some rest. I'm composing a list of totally unreasonable feature requests, so you are going to have a big day tomorrow. (Or today, if it's already Monday.)

Seriously, thanks a lot, Roman. You guys and your product rock!

-- Larry

0

Please sign in to leave a comment.