I’m looking to use ‘root’ or ‘~’ within a style tag to keep all my styles together and in one location.
Instead of having to rely on ‘../../’ notation, can this be achieved?
My current code..
<style type="text/css">
@import url(../../../styles_dev.css);
@import url(../../styles/AssessHome.css);
li{font-size: 14px;}
</style>
Is there a way to convert this to something like this…
<style type="text/css">
@import url(~/styles_dev.css);
@import url(~/styles/AssessHome.css);
li{font-size: 14px;}
</style>
Thanks for any help!
No you can not use the ~ symbol there, is not going to be translate.
Alternative you can use the root of your server and run and debug your site on local iis, or use the relative paths as you all ready do.
Other solution is to render in code behind this lines using a custom handler for css.