Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style sheets #118

Merged
merged 20 commits into from Jul 17, 2020
Merged

Style sheets #118

merged 20 commits into from Jul 17, 2020

Conversation

zenker981
Copy link
Contributor

Closes #81

@@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't include the browser adapter in our repo. It is also available on npm:
https://www.npmjs.com/package/css-select-browser-adapter

src/svg2pdf.js Outdated
// returns an attribute of a node, either from the node directly or from css
var getAttribute = function (node, propertyNode, propertyCss) {
propertyCss = propertyCss || propertyNode;
var getAttribute = function (node, propertyNames, styleSheets) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could define getAttribute on the context object, as we need a context anyways for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I tried to implement it in a way that you can use getAttribute() without any context...

src/svg2pdf.js Outdated
}

StyleSheets.loadSheet = function (url) {
const request = new XMLHttpRequest();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could try and use the styleSheets API for this. Don't know if this works, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I retried it and couldn't find any styleSheets in the debug.html DOM...

zenker981 and others added 5 commits November 8, 2019 09:32
# Conflicts:
#	karma.conf.js
#	package-lock.json
#	package.json
#	src/applyparseattributes.ts
#	src/context/context.ts
#	src/nodes/circle.ts
#	src/nodes/clippath.ts
#	src/nodes/containernode.ts
#	src/nodes/ellipse.ts
#	src/nodes/geometrynode.ts
#	src/nodes/group.ts
#	src/nodes/image.ts
#	src/nodes/marker.ts
#	src/nodes/path.ts
#	src/nodes/pattern.ts
#	src/nodes/rect.ts
#	src/nodes/renderednode.ts
#	src/nodes/svg.ts
#	src/nodes/svgnode.ts
#	src/nodes/text.ts
#	src/nodes/use.ts
#	src/parse.ts
#	src/svg2pdf.ts
#	src/utils/bbox.ts
#	src/utils/misc.ts
#	src/utils/node.ts
#	src/utils/patterngradient.ts
#	src/utils/svgpathadapter.ts
#	src/utils/text.ts
#	test/common/tests.js
#	test/unit/webpack.config.js
#	tsconfig.json
@HackbrettXXX HackbrettXXX merged commit 08f5c27 into yWorks:master Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support css styling with style-tags
2 participants