Commit 294c6b99 authored by Julie Blanc's avatar Julie Blanc

Merge branch 'master' of gitlab.pagedmedia.org:tools/experiments

parents 45cb770b d2d68d79
......@@ -9,16 +9,16 @@
</title>
<!-- fonts -->
<link rel="stylesheet" href="fonts/ibm-plex-sans/stylesheet.css" />
<link rel="stylesheet" href="fonts/gap-sans/stylesheet.css" />
<link rel="stylesheet" href="fonts/muli/stylesheet.css" />
<!-- <link rel="stylesheet" type="text/css" href="fonts/ibm-plex-sans/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="fonts/gap-sans/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="fonts/muli/stylesheet.css" /> -->
<!-- styles -->
<link rel="stylesheet" href="css/interface.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/interface.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!-- paged.js script -->
<script async src="http://localhost:9090/dist/paged.polyfill.js"></script>
<script async src="http://unpkg.com/pagedjs/dist/paged.polyfill.js"></script>
<!-- snap-text-baselin -->
......@@ -30,10 +30,11 @@
window.PagedConfig = {
before: function () {
snapBaseline({
baseline: 40,
baseline: 30,
strict: true,
showBaseline: true,
element: '.pagedjs_page'
element: '.pagedjs_page',
baselineColor: 'red'
});
}
};
......
......@@ -3,15 +3,19 @@ function snapBaseline(config){
const baselineDoc = config.baseline;
const strict = config.strict;
const showBaseline = config.showBaseline;
const baselineColor = config.baselineColor;
const elementBaseline = config.element;
/* set the baseline*/
let setBaseline = ':root{ --pagedjs-baseline: ' + baselineDoc + 'px}'
addcss(setBaseline)
let setBaseline = ':root{ --pagedjs-baseline: ' + baselineDoc + 'px; }';
let setBaselineColor = ':root{ --pagedjs-baseline-color: ' + baselineColor + ';}';
addcss(setBaseline);
addcss(setBaselineColor);
/* Visibility of the baseline */
let showBaselineCSS = elementBaseline + `{
background: linear-gradient( white 0%, white calc(var(--pagedjs-baseline) - 1px), #999 calc(var(--pagedjs-baseline) - 1px), #999 var(--pagedjs-baseline)), transparent;
background: linear-gradient( white 0%, white calc(var(--pagedjs-baseline) - 1px), var(--pagedjs-baseline-color) calc(var(--pagedjs-baseline) - 1px), var(--pagedjs-baseline-color) var(--pagedjs-baseline)), transparent;
background-size: 100% var(--pagedjs-baseline);
background-repeat: repeat-y;
background-position-y: var(--pagedjs-baseline-position);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment