We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm trying to change fill color of an SVG.
fill
gulp.task('colors', function() { return gulp.src("./src/logo.svg") .pipe(xeditor([ {path: '//g[@id="logo-color"]', attr: {'fill': '#FFFFF'}} ])) .pipe(gulp.dest('./dest')); });
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg width="311px" height="522px" viewBox="0 0 311 522" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"> <!-- Generator: Sketch 3.4 (15575) - http://www.bohemiancoding.com/sketch --> <title>logo</title> <desc>Created with Sketch.</desc> <defs></defs> <g id="Logo" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage"> <g id="logo-color" sketch:type="MSArtboardGroup" fill="#3C8A2E"> ... </g> </g> </svg>
But I'm always getting this error:
events.js:85 throw er; // Unhandled 'error' event ^ Error: Can't find element at "//g[@id="logo-color"]"
Do not see what I'm doing wrong. Can somebody help me ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm trying to change
fill
color of an SVG.But I'm always getting this error:
Do not see what I'm doing wrong. Can somebody help me ?
The text was updated successfully, but these errors were encountered: