Skip to content

feat: allow clip-path and mask attributes in Metanorma profile (closes #80) - #87

Merged
ronaldtse merged 1 commit into
mainfrom
feat/clip-path-mask-support-issue-80
Apr 11, 2026
Merged

feat: allow clip-path and mask attributes in Metanorma profile (closes #80)#87
ronaldtse merged 1 commit into
mainfrom
feat/clip-path-mask-support-issue-80

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

Add support for clip-path and mask SVG presentation attributes in the Metanorma profile (issue #80).

These are standard SVG features used for:

  • Clipping: Restricting rendering to a defined region (e.g., wire annotations, gap handling)
  • Masking: Applying opacity/transparency effects (e.g., hatching patterns, image compositing)

Changes

  • config/profiles/metanorma.yml: Added clip-path and mask to 14 element configurations (svg, path, rect, circle, line, ellipse, polyline, polygon, solidColor, textArea, text, g, use, image)
  • docs/profiles.adoc: Documented clipping and masking support in Metanorma profile section
  • docs/requirements.adoc: Added "Clipping and Masking Support" section explaining the feature
  • spec/.../allowed_elements_requirement_spec.rb: Added 5 tests for clip-path/mask functionality

Verification

  • All 350 tests pass
  • svg_1_2_rfc profile still rejects clip-path/mask (unchanged behavior)
  • Metanorma profile now allows clip-path/mask (0 errors)
  • Validated against 4056 SVG files in iso-10303 repository - 173 files have clip-path/mask attributes that are now allowed

Closes #80

Add support for clip-path and mask SVG presentation attributes in the
Metanorma profile. These are standard SVG features used for:

- Clipping: Restricting rendering to a defined region (e.g., wire annotations)
- Masking: Applying opacity/transparency effects (e.g., hatching patterns)

Implementation:
- Added clip-path and mask to 14 element configurations in metanorma.yml
- Added documentation in docs/profiles.adoc and docs/requirements.adoc
- Added tests for clip-path and mask global properties

This fixes issue #80 by allowing these valid SVG attributes that were
previously being rejected as invalid.

Closes #80
@ronaldtse
ronaldtse merged commit e8a4891 into main Apr 11, 2026
11 checks passed
@ronaldtse
ronaldtse deleted the feat/clip-path-mask-support-issue-80 branch April 11, 2026 04:33
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.

Extend Metanorma SVG profile to accept clip-path and mask attributes

1 participant