CSS editor doesn't recognize colors like #EA3

Having trouble installing Oxygen? Got a bug to report? Post it all here.
DavidPérez
Posts: 44
Joined: Fri Aug 05, 2005 2:18 pm

CSS editor doesn't recognize colors like #EA3

Post by DavidPérez »

#EA3 is a short form for #EEAA33.
It gives me a warning specifying I haven't provided a color.
I think this a bug that should be solved.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

I cannot reproduce the warning with color #EA3 or background color #EA3. I tried with the CSS profiles CSS 2, CSS 2.1, CSS 3 and the warning level All. What is your <oXygen/> version ? Please post a sample of the CSS where you get the warning.

Regards,
Sorin
DavidPérez
Posts: 44
Joined: Fri Aug 05, 2005 2:18 pm

Post by DavidPérez »

My environment:
Oxygen 7.1
Eclipse 3.1.2
Java 1.5.0_05
Windows 2003 server

CSS fragment:

Code: Select all

table tbldiv th {
font-weight: bold;
font-size:0.8em;
background-color: #EFE;
}
Warning I receive: (Level : 1) You have no background-color with your color
on line: background-color: #EFE;
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

DavidPérez wrote:

Code: Select all

table tbldiv th {
font-weight: bold;
font-size:0.8em;
background-color: #EFE;
}
Warning I receive: (Level : 1) You have no background-color with your color
on line: background-color: #EFE;
I think the warning message is "You have no color with your background-color" because you use the background-color property without the color property. You get the warning "You have no background-color with your color" if you specify the color property without the background-color property. It is just a warning that you should make sure that the combination of background color and the default foreground color keep text readable when the CSS is applied. For example yellow text on white background is not readable. If you do not want to receive the warning set the warning level to Most Important in Options -> Preferences -> CSS Validator.

Regards,
Sorin
DavidPérez
Posts: 44
Joined: Fri Aug 05, 2005 2:18 pm

Post by DavidPérez »

Thanks George for your hint.

I don't want to see this warning.

I have removed all the warnings in the options dialog, and it keeps showing me the warnings, even if I reopen the file.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

I do not get the warning any more after I go to Window -> Preferences -> oXygen -> CSS Validator and I switch the warning level to Most Important or No Warnings, press OK in the Preferences dialog and validate again. I tried with the CSS 2, CSS 2.1 and CSS 3 profiles, media type: all.

Regards,
Sorin
DavidPérez
Posts: 44
Joined: Fri Aug 05, 2005 2:18 pm

Post by DavidPérez »

I've discovered that your solution works with simple files, but with this one doesn't

/* Generico */
HTML BODY, DD, DIR, DIV, DL, DT, LI, MENU, OL, P, PRE, TD, TH, TR, UL {
font-size: 1em;
font-family: Geneva, Helvetica, Arial, sans-serif;
color: black;
}
/*******Enlaces*/
A {
cursor: pointer;
background: transparent;
}
A:link {
color: blue;
text-decoration: none;
}
A:visited {
color: blue;
text-decoration: none;
}
A:active {
color: blue;
text-decoration: none;
}
A:hover {
color: blue;
background-color: #CFC;
text-decoration: underline;
}
BLOCKQUOTE {
margin-top: .75em;
line-height: 1.5;
margin-bottom: .75em;
}
BODY {
background: #ffffff;
padding: 0;
cursor: default;
line-height: 1.3;
margin: 1em 1em 1em 1em;
line-height: 1.5;
}
BUTTON {
border: 1px solid #666;
height: 25px;
}
CITE {
font-style: italic;
}
DD {
line-height: 1.2;
margin: 0 0 0 5%;
}
DIV {
margin: 0;
}
DL {
margin: .8em 0;
}
DT {
margin: .3em 0 0 0;
line-height: 1.2;
}
FORM {
margin: 0 0;
}
H1, H2, H3, H4, H5, H6 {
color: #990000;
font-family: Geneva, Helvetica, Arial, sans-serif;
font-weight: bold;
margin: .8em 0 0 -4%;
line-height: 1.3;
}
H1 {
margin-left/* */ : -4%;
font-size: 1.75em;
}
H2 {
margin-left/* */ : -4%;
font-size: 1.75em;
}
H3 {
margin-left/* */ : -3%;
font-size: 1.52em;
}
H4 {
margin-left/* */ : -3%;
font-size: 1.33em;
}
H5 {
margin-left/* */ : -2%;
font-size: 1.15em;
}
H6 {
margin-left/* */ : -1%;
font-size: 1em;
}
HR {
margin: .6em;
}
HTML {
margin: 0;
padding: 0;
}
P {
margin: .6em 0;
line-height: 1.5;
}
PRE {
border: solid thin;
padding: 1em 3%;
margin: .75em 0;
line-height: 1.2;
font-size: 1em;
white-space: pre;
background: #ddd;
}
SUB, SUP {
font-size: .85em;
}
TD {
line-height: 1.3;
}
TH {
line-height: 1.3;
}
HTML {
margin: 0;
padding: 0;
}
TEXTAREA {
cursor: text;
}
TD {
line-height/* */ : 21px;
margin-left: 0;
}
TH {
font-weight: bold;
text-align: center;
margin-left: 0;
line-height/* */ : 21px;
}
/*******Listas*/
UL, DIR, MENU {
margin: 0 0 0 0;
line-height: 1.1em;
list-style: disc;
}
OL {
margin: 0 0 0 0;
line-height: 1.1em;
list-style: decimal;
}
LI {
margin: .6em 0 0 .5em;
}
UL UL OL OL, UL OL UL OL, OL UL OL OL, OL OL UL OL, OL UL OL, OL OL {
list-style: lower-alpha;
}
OL UL OL OL, OL OL UL OL, UL OL OL OL, OL OL OL {
list-style: lower-roman;
}
OL OL OL OL {
list-style: decimal;
}
UL UL, OL OL UL UL, OL UL OL UL, UL OL OL UL, OL UL UL, UL OL UL {
list-style: circle;
}
OL UL UL UL, UL OL UL UL, UL UL OL UL, UL UL UL {
list-style: square;
}
UL UL UL UL {
list-style: disc;
}
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

It works for me. I get 3 validation errors about the cursor property which is not allowed in the CSS 1 profile. Of course I left the Warning Level to Most Important in order to not receive the warnings "You have no background-color with your color" as I described above. If I change the profile to CSS 2 or CSS 2.1 or CSS 3 and leave Warning Level to Most Important the validation of your CSS file gives no error and no warning.

Regards,
Sorin
Post Reply