PDA

View Full Version : CSS and shorthand in DW


keano
05-19-2006, 06:12 PM
when doing shorthand CSS in DW8 is there a way to bring up the window helper?

such as border: 1px solid #000000;

how do I go about using the color picker to change the color? Can you highlight it and bring up the helper menu (color swatches)?

domedia
05-19-2006, 06:33 PM
If I remember right, there should be a setting in the preferences(?) to turn the use of shorthand on and off. In the CSS panel, colors etc are set normally, while DW will write in shorthand for you.
I've never used DW to write my CSS, so my advice might be wrong.
Anyone else?

On a sidenote, I actually wrote the first real article on all the CSS shorthand properties years ago:http://home.no.net/junjun/html/shorthand.html

catdragon
06-25-2009, 07:43 PM
Is there a way to turn off shorthand in CS4? I've been looking for about an hour and haven't got a clue how to. I thought it would be in Preferences (logically).

domedia
06-25-2009, 07:48 PM
It's in the CSS editing preferences in the CSS Styles category of the Preferences dialog box (Edit > Preferences in Windows; Dreamweaver > Preferences on the Macintosh).

But why would you turn this off?

catdragon
06-25-2009, 07:57 PM
Figuring out what the shorthand means hurts my brain. :) Seriously, its just a preference. I can survive either way, I just prefer long numbers.

Oh, i did find this dialog in the Preferences. However, all my boxes are 'off' (not clicked) but i still get the shorthand when i use the color picker.

domedia
06-27-2009, 03:32 PM
However, all my boxes are 'off' (not clicked) but i still get the shorthand when i use the color picker. There's no shorthand for color.. Can you give an example?

catdragon
06-27-2009, 04:01 PM
I think what I want isn't a part of CS4.

Whenever I use the color picker to pick a color (for a backbround, a text color, what have you), the color gets placed in my code as the shorthand version.

That is what i don't want. I prefer the longer version (6 hexadecimal digits).

Perhaps my problem is that I don't understand the shorthand method sufficiently. What I have been able to gather is that if there are two identical digits in the 1-2, 3-4, or 5-6 positions, then it is shortened to one digit.

Thus
000000 = 000
FF0000 = F00
00FFFF = 0FF
0EFFAA = 0EFA
A9CCCC = A9CC

Is this correct? I hate to bother you on a public forum so feel free to e-mail me directly if you think it is appropriate.

domedia
06-27-2009, 04:05 PM
Perhaps my problem is that I don't understand the shorthand method sufficiently. What I have been able to gather is that if there are two identical digits in the 1-2, 3-4, or 5-6 positions, then it is shortened to one digit.
This is correct. If the hex value is represented in 3 pairs, it's getting optimized. I think you understand it just fine :)

Thus
000000 = 000
FF0000 = F00
00FFFF = 0FF
0EFFAA = 0EFA
A9CCCC = A9CC

Is this correct?
Only the 3 first examples are correct, because they are consisting of 3 pairs. The last two do not have all pairs (0e and a9), so it has to be written using all 6 hex numbers.

catdragon
06-27-2009, 04:40 PM
It would be nice, though, to have an option to turn on shorthand for colors. Can we consider this a feature for the next version. Please?? Pretty Please? With chocolate (or #D2691E if you prefer)

domedia
06-27-2009, 06:16 PM
It would be nice, though, to have an option to turn on shorthand for colors. Not sure anyone is going to agree with that, so I wouldn't hold my breath :)