From 720b52c7efea85bfbfdc203c6c303c2241f774c2 Mon Sep 17 00:00:00 2001 From: Bruno Salmon Date: Wed, 29 May 2024 14:08:59 +0100 Subject: [PATCH] Added copy of javafx-graphics CSS file for j2cl --- .../webfx-kit-javafxgraphics-fat-j2cl/pom.xml | 23 +++++++++++++++++++ .../css/webfx-kit-javafxgraphics-web@main.css | 23 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 webfx-kit/webfx-kit-javafxgraphics-fat-j2cl/src/main/webfx/css/webfx-kit-javafxgraphics-web@main.css diff --git a/webfx-kit/webfx-kit-javafxgraphics-fat-j2cl/pom.xml b/webfx-kit/webfx-kit-javafxgraphics-fat-j2cl/pom.xml index 8f2dbb6c9..4febedf20 100644 --- a/webfx-kit/webfx-kit-javafxgraphics-fat-j2cl/pom.xml +++ b/webfx-kit/webfx-kit-javafxgraphics-fat-j2cl/pom.xml @@ -16,6 +16,29 @@ + + + maven-antrun-plugin + + + append-main + + run + + compile + + + + + + + + + + + + + org.apache.maven.plugins maven-dependency-plugin diff --git a/webfx-kit/webfx-kit-javafxgraphics-fat-j2cl/src/main/webfx/css/webfx-kit-javafxgraphics-web@main.css b/webfx-kit/webfx-kit-javafxgraphics-fat-j2cl/src/main/webfx/css/webfx-kit-javafxgraphics-web@main.css new file mode 100644 index 000000000..c10bf5d7d --- /dev/null +++ b/webfx-kit/webfx-kit-javafxgraphics-fat-j2cl/src/main/webfx/css/webfx-kit-javafxgraphics-web@main.css @@ -0,0 +1,23 @@ +/* Mocking some basic JavaFX behaviours */ +body { + overflow: hidden; /* Disabling browser horizontal and vertical scroll bars */ + margin: 0; /* Removing the default margin around the body */ + /* Disabling user selection by default */ + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +/* Making disabled nodes semi-transparent */ +.disabled { + opacity: 50%; +} + +/* When fill and stroke are not set by application code, we make them transparent by default like in JavaFX (otherwise + the browser will make them black). */ +fx-svgpath svg { + fill: none; + stroke: none; +} \ No newline at end of file