Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@vivliostyle/theme-base
Advanced tools
Base theme and CSS toolkit for Vivliostyle themes
npm install --save @vivliostyle/theme-base
# or
yarn add @vivliostyle/theme-base
In vivliostyle.config.js
:
module.exports = {
theme: '@vivliostyle/theme-base',
};
This package is designed to be modular so that it can be referenced and used by other themes. Each setting is configured as a CSS variable so that it can be changed to suit your preferences.
There're several presets to import modules we recommend.
// Import theme-all.css
module.exports = {
theme: {
specifier: '@vivliostyle/theme-academic',
import: 'theme-all.css',
},
};
// Import theme-basic.css
module.exports = {
theme: {
specifier: '@vivliostyle/theme-academic',
import: 'theme-basic.css',
},
};
/* Import theme-all.css */
@import url(@vivliostyle/theme-base/theme-all.css);
/* Import theme-basic.css */
@import url(@vivliostyle/theme-base/theme-basic.css);
Modules | theme-all.css | theme-basic.css |
---|---|---|
Basic | ✅ | ✅ |
Cross-reference | ✅ | - |
Endnotes | ✅ | - |
Footnotes | ✅ | - |
Page layout | ✅ | - |
Section references | ✅ | - |
Table of Contents | ✅ | - |
Utility classes | ✅ | - |
Prism (Code highlighting) | - | - |
@import url(@vivliostyle/theme-base/css/common/meta-properties.css);
@import url(@vivliostyle/theme-base/css/common/reset.css);
@import url(@vivliostyle/theme-base/css/common/basic.css);
/* Configuration examples */
:root {
--vs-font-family: 'Times New Roman', serif;
--vs-font-size: 12px;
--vs--heading-line-height: 1.3;
--vs--h1-font-size: 2.5em;
}
--vs-
--vs--
@import url(@vivliostyle/theme-base/css/partial/crossref.css);
/* Configuration examples */
:root {
--vs-crossref--counter-style: upper-roman;
--vs-crossref--marker-cite-content: target-counter(attr(href), cite) '.';
}
--vs-crossref--
@import url(@vivliostyle/theme-base/css/partial/endnote.css);
/* Configuration examples */
:root {
--vs-endnote--call-font-size: 90%;
--vs-endnote--section-ol-list-style-type: lower-latin;
}
--vs-endnote--
@import url(@vivliostyle/theme-base/css/partial/footnote.css);
@import url(@vivliostyle/theme-base/css/partial/footnote-external-link.css);
/* Configuration examples */
:root {
--vs-footnote--call-content: '[' counter(footnote) ']';
--vs-footnote--area-before-margin-inline: 0 80%;
}
--vs-footnote--
@import url(@vivliostyle/theme-base/css/partial/page.css);
/* Configuration examples */
:root {
--vs-page--mbox-content-bottom-center: counter(page);
/*
* Vivliostyle.js provides env(doc-title) and env(pub-title)
* https://docs.vivliostyle.org/#/supported-css-features#values
*/
--vs-page--mbox-content-top-left: env(doc-title);
--vs-page--mbox-content-top-right: string(section-title);
}
/*
* Setting named string
* https://www.w3.org/TR/css-gcpm-3/#named-strings
*/
h1 {
string-set: section-title content();
}
--vs-page--
@import url(@vivliostyle/theme-base/css/partial/section.css);
/* Configuration examples */
:root {
--vs-section--marker-display: inline;
--vs-section--call-content: 'Sec. ' target-counters(attr(href), sections, '.');
}
--vs-section--
@import url(@vivliostyle/theme-base/css/partial/toc.css);
/* Configuration examples */
:root {
--vs-toc--marker-margin-inline: 8rem;
}
--vs-toc--
@import url(@vivliostyle/theme-base/css/partial/utility-classes.css);
@import url(@vivliostyle/theme-base/css/lib/prism/base.css);
/* Use okaidia theme */
@import url(@vivliostyle/theme-base/css/lib/prism/theme-okaidia.css);
/* Use prism theme */
@import url(@vivliostyle/theme-base/css/lib/prism/theme-prism.css);
/* Configuration examples */
:root {
--vs-prism--background: #aaa;
--vs-prism--block-code-padding: 2rem 1rem;
}
--vs-prism--
CC0 1.0
Original author: Vivliostyle project team
FAQs
Base theme and CSS toolkit for Vivliostyle themes
We found that @vivliostyle/theme-base demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.