summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Slaughter <pslaughter@gitlab.com>2019-07-31 15:20:36 +0000
committerPaul Slaughter <pslaughter@gitlab.com>2019-07-31 15:20:36 +0000
commitf8185c5c5a28523ce128eebdc042ae5641d17f63 (patch)
tree41a984c104d7d96392c7bb7e2727b9fd1296a5fa
parent2e7f4bbb66b4bae61c9dd09234e8435c91e7e986 (diff)
downloadgitlab-ce-fe-update-guide-on-js-css-selectors.tar.gz
Update doc/development/new_fe_guide/style/javascript.mdfe-update-guide-on-js-css-selectors
-rw-r--r--doc/development/new_fe_guide/style/javascript.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/development/new_fe_guide/style/javascript.md b/doc/development/new_fe_guide/style/javascript.md
index 802ebd12d92..98359f718f4 100644
--- a/doc/development/new_fe_guide/style/javascript.md
+++ b/doc/development/new_fe_guide/style/javascript.md
@@ -137,6 +137,10 @@ parseInt('10', 10);
If a CSS class is only being used in JavaScript as a reference to the element, prefix
the class name with `js-`.
+Please note: `js-` is only needed when a CSS class has no other purpose but to be
+used by JavaScript. It's okay for JavaScript to reference CSS classes without the
+`js-` selector if it makes semantic sense.
+
```html
// bad
<button class="add-user"></button>