How does element suggestion work? #141
-
|
Hi, i am working on a web app and using CodeMirror 6 to style stuff inside it. I was wondering how do you manage to provide a list of selectors to suggest to the user, do you use an extension? how do you create the dynamic list of selectors? |
Beta Was this translation helpful? Give feedback.
Answered by
webextensions
Jun 15, 2024
Replies: 1 comment 3 replies
-
|
It is custom code. There are 2 parts for suggesting the CSS selectors:
There is an intention to move these aspects into their own libraries when time permits, as noted at: Line 34 in ad07e6f |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
5e-Cleric
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@5e-Cleric
It is custom code. There are 2 parts for suggesting the CSS selectors:
getExistingCSSSelectorsat:live-css-editor/extension/scripts/magicss/magicss.js
Line 1078 in ad07e6f
generateSelectorin file https://github.com/webextensions/live-css-editor/blob/ad07e6fe50d1c7684eab8313fe760cf70ccdafd1/extension/scripts/magicss/generate-selector.js which is used at:live-css-editor/extension/scripts/magicss/magicss.js
Line 2158 in ad07e6f