-
Notifications
You must be signed in to change notification settings - Fork 4
FAQs
Add the new file at the root of the skin folder (e.g., Contact.ascx
). It's easiest to duplicate Main.ascx
so you have the required include directives and base markup.
See the Skins/CLIENT_CODE
docs for more information.
If you need a container that also has its own stylesheet:
- Add an
.ascx
file with the required elements to the client's container folder (e.g.,Portals/_default/Containers/CLIENT_CODE
). - Add an
.scss
file with the same name toSkins/CLIENT_CODE/src/scss/Containers
.
If you only need a container and do not need a stylesheet, ignore step two.
See the Portals/_default/Containers
docs for more information about container templates. See the src/scss/Containers
docs for more information about container stylesheets.
It depends.
Site-wide styles are anything that ends up in Skin.css
, and those Sass files are found in the src/scss
directory. Check src/scss/Skin.scss
to see which partials are being imported.
However, most everything you will need is found in _abstracts/_variables.scss
and _base/_content.scss
.
When changing global styles, always prefer to modify variables first. This helps because both the Bootstrap source and our custom styles inherit these changes.
Content styles are targeting any content that ends up inside a DNN module. See the comments in _content.scss
for more information.
See the src/scss
docs for more information about Sass, our integration with Bootstrap, and how the skin stylesheets are built.
Add a new DnnCssInclude
tag in includes/_preheader.ascx
. Example:
<dnn:DnnCssInclude
FilePath="URL_TO_YOUR_FILE_HERE"
Priority="1"
runat="server"
/>
- Add the font files to the
src/fonts
directory. - Uncomment the code in
src/scss/_base/_fonts.scss
and update. - Verify that
@import "_base/fonts"
is active inSkin.scss
.
If you are setting this new font as your global serif or sans-serif font, modify one of the initial Typography variables in _variables.scss
so that it is inherited by the applied Typography variables.
Otherwise, let's say you want to add an alternative sans-serif font. Follow these steps:
- Create a
$asl--font-family-sans-serif-alt
variable in the initial Typography section. - Create a
$font-family-sans-serif-alt
variable in the applied Typography section
Then you can add/modify CSS classes with font-family: $font-family-sans-serif-alt
wherever you need.
See the comments in _variables.scss
for more information about what we mean by initial variables vs. applied variables.
Refer to the "Step 1" instructions from above. The differences:
-
If you are including a font API, add the
DnnCssInclude
tag to the specific layout template — not to_preheader.ascx
. -
If you are including the font files in the skin, add the
@import "_base/fonts"
to the specific layout stylesheet — not toSkin.scss
.
- Copy the "ContentPane" found in
Main.ascx
and update. - Make sure the
id
anddata-name
attributes are the same name.
See the Skins/CLIENT_CODE
docs for more information about panes.