X

Geertjan's Blog

  • June 9, 2016

Referencing CSS from an Oracle JET Module

Geertjan Wielenga
Product Manager

Here's the "home.html" of the "home" JET module my application. Here you can see how to reference a CSS file within a view of a JET module, rather than in the "index.html" file, where the standard CSS references is used. In this way, you can import fragments of CSS specific to a JET module and, in that way, create a modular approach to your CSS stylings:

<STYLE TYPE="text/css">
<!--
@import url(css/styles.css);
-->
</STYLE>
<div id="circle"></div>

And here's the content of the CSS file referred to above: 

#circle {
border-radius: 50px/50px;
border:solid 21px #f00;
width:50px;
height:50px;
}

Join the discussion

Comments ( 1 )
  • Chris Monday, June 13, 2016

    If this the native import from css? Import is one paradigm what you should avoid in pure css. In sass there is no problem, because they will resolve the paths to the files and will concat it and implements it directly into the file. The problem with css. Why you should avoid css @import, because the files will load/download from the browser file by file, so no parallel. This will increase the loading time of your page.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services