Function sauron::prelude::jss::selector_namespaced [−]
pub fn selector_namespaced(
namespace: impl ToString,
selector_classes: impl ToString
) -> String
Expand description
Prepend a namespace to the selector classes, It does not affect other selectors such element selector, #id selector example:
use jss::selector_namespaced;
assert_eq!(".frame__text-anim", selector_namespaced("frame", ".text-anim"));
assert_eq!(
".frame__hide .frame__corner",
selector_namespaced("frame", ".hide .corner")
);
assert_eq!(".frame__hide button", selector_namespaced("frame", ".hide button"));
assert_eq!(".frame__expand_corners,.frame__hovered", selector_namespaced("frame", ".expand_corners,.hovered"));
assert_eq!(".frame__expand_corners,.frame__hovered button .frame__highlight", selector_namespaced("frame", ".expand_corners,.hovered button .highlight"));
assert_eq!(".frame__expand_corners.frame__hovered button .frame__highlight", selector_namespaced("frame", ".expand_corners.hovered button .highlight"));