Jump to content

Recommended Posts

Hello community :1_grinning:

As I have learned, in CSS/HTML coding everything is written in small letters.
But the hexa codes in the color fields in designer/publisher are always shown with upper case letters.
So I copy that of course also into my CSS file.

This may be incomprehensible for some, but the hexadecimal codes in upper case letters disturb me massively in my CSS files. :34_rolling_eyes:

My teacher's not so happy about it either.
I'm currently manually adjusting the spelling of the hexadecimal codes - I don't want to get a worse grade because of that. :7_sweat_smile:

Does anyone know if I can change the spelling? I have already searched through all possible settings, but found nothing suitable.

Many thanks in advance!
Mimi

Share this post


Link to post
Share on other sites

No there is no way to set the letters to lower case from within the Affinity apps, unless you pasted to the workspace and changed the case of the letters and then copied to clipboard again.

 


iMac 27" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Affinity Designer/Photo & Publisher - Illustrator CC, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

Affinity Help - Affinity Desktop Tutorials - FeedbackInstagram & Flickr

Share this post


Link to post
Share on other sites

For CSS/HTML coding one usually also use or have a capable text editor beside, just use that then and it's regex find and replace with convert case feature for those files.


☛ Affinity Designer 1.7.3 ◆ Affinity Photo 1.7.3 ◆ OSX El Capitan

Share this post


Link to post
Share on other sites

I wonder, is it so bad to have uppercase letters colour hex code in CSS, I find it more legible than lowercase, is lowercase the norm for css coding or is it just personal taste?


iMac 27" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Affinity Designer/Photo & Publisher - Illustrator CC, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

Affinity Help - Affinity Desktop Tutorials - FeedbackInstagram & Flickr

Share this post


Link to post
Share on other sites

It’s been a long time since I have written any CSS but I’m fairly sure that the upper/lower case issue is purely a personal – or organisational – choice. Mimi’s teacher might personally hate using upper case hex values but if Mimi goes to work for a company the practices of that company may specify that upper case is actually preferred (for whatever reason).
A good rule-of-thumb here would seem to be: Be consistent with the rest of the code base.
In other words, if you are writing it just for yourself then do whatever feels best for you, but if you have to work with other people, do what they do.

The W3C specification https://www.w3.org/TR/CSS2/syndata.html#characters states that “All CSS syntax is case-insensitive within the ASCII range (i.e., [a-z] and [A-Z] are equivalent), except for parts that are not under the control of CSS.” and the examples for colour hex values (section 4.3.6) are in both lower and upper case, so the W3C don’t seem to be too bothered about it.

Share this post


Link to post
Share on other sites
6 hours ago, GarryP said:

It’s been a long time since I have written any CSS but I’m fairly sure that the upper/lower case issue is purely a personal – or organisational – choice. Mimi’s teacher might personally hate using upper case hex values but if Mimi goes to work for a company the practices of that company may specify that upper case is actually preferred (for whatever reason).
A good rule-of-thumb here would seem to be: Be consistent with the rest of the code base.
In other words, if you are writing it just for yourself then do whatever feels best for you, but if you have to work with other people, do what they do.

The W3C specification https://www.w3.org/TR/CSS2/syndata.html#characters states that “All CSS syntax is case-insensitive within the ASCII range (i.e., [a-z] and [A-Z] are equivalent), except for parts that are not under the control of CSS.” and the examples for colour hex values (section 4.3.6) are in both lower and upper case, so the W3C don’t seem to be too bothered about it.

Thank Garry, I've noticed that a lot of apps; in fact the majority of apps, that can produce hex coded colour, do so in uppercase characters which leads me to believe this is the accepted method for hex colour code and lowercase is a matter of coding taste. I'd stay with uppercase hex colour code unless I was given a valid reason for lowercase, i.e compatibility etc but not "because I say so."


iMac 27" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Affinity Designer/Photo & Publisher - Illustrator CC, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

Affinity Help - Affinity Desktop Tutorials - FeedbackInstagram & Flickr

Share this post


Link to post
Share on other sites

Yeah, all of the applications I can remember using displayed hex in upper case too. Some may not have but I just don’t remember them.
I’ve a feeling – unsubstantiated – that this could be because the APIs used have this as the default, and most decimal-to-hex conversion code I have seen uses upper case too. A web search for “decimal to hex” or “<any coding language> decimal to hex” shows the same, although there may be some exceptions.
Personally I used to write CSS with lower case hex values but that was only because I had read somewhere that it was the ‘proper’ way to do it, even though I preferred to see them in upper case as it made them a bit easier to find, for me at least.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.