But, that's probably what you intended, yes?
No. If you're using it as a passage tag, which was what I was referring to, then the sibling class form—i.e. with no space between them—is correct since they are sibling classes, both on the passage element. If you put a space between them, then that signifies that the .noselect element is a descendant of the .passage element. I'm not sure what you're doing, but it wasn't what I was talking about.
That said. It doesn't really matter, as long as you have it working for your setup.
They only thing I may have to come up with is a way for the user to turn it off, so that if they do have the intention of copying sways of the story (for whatever reason), they can. I'm not sure where to put that kind of option though. Maybe in settings.
A setting would be easy, if allowing players to select links is important.
Try the following JavaScript:
var settingNoselectHandler = function () {
if (settings.noselect) { // is true
$('html').addClass('select');
}
else { // is false
$('html').removeClass('select');
}
};
Setting.addToggle('noselect', {
label : 'Allow links to be selected?',
default : false,
onInit : settingNoselectHandler,
onChange : settingNoselectHandler
});
And the accompanying style, which should work both with the setting and with whatever setup you're using:
html[data-tags~="noselect"]:not(.select) .passage a {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}