Making open-source CSS class/id names unique -
i'm trying make class/id names in stylesheet unique, example bootstrap or other open-source css framework.
i've found list of class names in bootstrap 3, ex:
.col-sm-1 .col-sm-2 .col-sm-3 ...
i'm going building form using bootstrap css used on websites (think stripe's modal paste website , maintains styles).
however, if leave bootstrap css classes , ids untouched there sorts of problems conflicting styles other's websites.
is there way preface or append company's name or random string every single style in stylesheet there won't problems conflicting styles?
ex:
.col-sm-1-abc123 .col-sm-2-abc123 ...
having styles above not cause problems conflicting styles. but, require appending "-abc123" every style.
is there way this? if so, how? if not, what's alternative accomplish i'm trying do?
if need prevend name problems, should use namespaces. can easy less, example:
.your_namespace_name { // here less/css code, example whole bootstrap css/less }
then give body or top div class of your_namespace_name:
<body class="your_namespace_name">
Comments
Post a Comment