css-flexbox-cheatsheet icon indicating copy to clipboard operation
css-flexbox-cheatsheet copied to clipboard

Idea: Add Property Picker

Open COD3BREAK3R opened this issue 5 years ago • 4 comments

I want the extension would have the ability to insert the selected properties directly in code. Would be great. Thanks

PD: The same characteristic in a version of CSS Grid extension

COD3BREAK3R avatar Sep 29 '20 17:09 COD3BREAK3R

That's an interesting idea. Thanks for sharing it.

It's absolutely possible. Can this also be achieved by having a way to easily copy a property from the cheatsheet? (It can then be pasted in the code). Or do you see it more as directly inserting a property in the code?

dzhavat avatar Sep 29 '20 18:09 dzhavat

For example:

When double click in the property is automatically inserted inside the block of ccs properties where is the cursor, analyzes for missing properties to work correctly the code pasted and if missing are added the necesary properties.

For example if missing display: flex; in the actually block of css properties when double click for insert flex-direction: row; is added automatically before display: flex; and then flex-direction: row;

I hope explained well my idea

COD3BREAK3R avatar Sep 29 '20 21:09 COD3BREAK3R

I understand what you mean. There are some things that will be easier than others like inserting properties into the code on click.

The analyzing part however is more difficult. I can already see some challenges in cases when an element has both class-a and class-b on it. If class-a already specifies display: flex, then there's no need to add it to class-b as well, etc.

I can at least implement the click-to-copy / click-to-insert part. I believe this will be a nice addition.

dzhavat avatar Oct 01 '20 05:10 dzhavat

Yes, copy function it's nice

COD3BREAK3R avatar Oct 01 '20 15:10 COD3BREAK3R