css * wildcard

Jul 16, 2014 at 6:50 AM
Edited Jul 16, 2014 at 6:51 AM
Does css * wildcard not work. Or body{font-size:14px;} etc?

I have some text in the htmlrenderer that doesn't have any tags and I would like to have a default size for all html etc.

Other than that, this is awesome. I have been searching for days for an HTML control that works with a transparent background.
Developer
Jul 16, 2014 at 9:37 AM
can you provide a sample that doesn't work
Jul 16, 2014 at 1:16 PM
Sure thing. In the HtmlRenderer properties under BaseStylesheet

<style type="text/css">
*{
font-size: 20px;
}
</style>

Or

<style type="text/css">
html, body{
font-size: 20px;
}
</style>
Developer
Jul 16, 2014 at 3:50 PM
indeed it seems "*" and "html" doesn't work, will add support for it
but "body" works as far as I can tell, do you have a sample where it doesn't?
Jul 16, 2014 at 4:00 PM
I could show you on a screen share… Or the attached screen shots.


Thanks,

Adam

Jul 16, 2014 at 5:29 PM
Previous messages was sent in email so I guess it didn't include the screen shots.

Can you PM me your email so I can send them to you or let me know if you got them from the email?
Developer
Jul 17, 2014 at 8:40 AM
I would prefer you attach the html showing the issue, then I can see how HTML Renderer handles it wrong compared to commercial browsers.
But if you want to attach screenshot as well, http://snag.gy/ is an excellent tool for that.
Jul 17, 2014 at 1:34 PM
Edited Jul 17, 2014 at 1:38 PM
Just text with no tags... in the body.

All browsers render the below css. These are basic tags, so I am not sure why its not working or I am entering it wrong for the control. I enter the below style tag in the BaseStylesheet properties section.

For the control I using it like this and it doesn't work.
<style type="text/css">
body {
    font-size: 20px;
}
li {
    line-height: 35px !important;
}
</style>
If I use this my li tag sizes work... so basically I am unable to target anything without inside the body or without its own html tag.
<style type="text/css">
span, ul, li {
    font-size: 20px;
}
li {
    line-height: 35px !important;
}
</style>
Here are a couple examples that browsers render this should set content in body to 20px...
<html>
<head>
<style type="text/css">
body{font-size:20px;}
</style>
</head>
<body>
<h1>This is an H1 Tag</h1>
This is text with no tag...
</body>
</html>
This would set all tags to default 40px...
<html>
<head>
<style type="text/css">
*{font-size:40px;}
</style>
</head>
<body>
<h1>This is an H1 Tag</h1>
This is text with no tag...
</body>
</html>
Let me know if thats enough to understand whats happening. Maybe this isn't a problem? I am just entering HTML from a DB, so maybe the control doesn't append your html to an html and body tag? Or does it? As I am not including the html or body tags anywhere as I assumed the control has that by default etc. If not does the control itself have its own tag?

It seems like it does have html and body tags as my other html and css work for targeting the li tags etc. And those list items are in li tags, I have other content on the same control but am unable to target it with css.
Developer
Jul 17, 2014 at 2:53 PM
k, I see 3 issues:
  1. * selector doesn't work - need to add support for it
  2. html selector doesn't work - strange, need to check it.
  3. body selector effects all inner elements where elements like h1 should overwrite the size set on body - will fix.
am I missing something?
Developer
Jul 17, 2014 at 2:54 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.