Skip to content

ahmadnassri/css-diagonal-separators

Repository files navigation

Pure CSS Diagonal Separators

Read The full post on Code Pen

Notes:

  • CSS Variables are used for demonstration purposes and future prosperity, they are yet to be supported across all browsers and rendering engines!
  • reversed & vertical variants listed below are verbose for demonstration purposes
    • for simple multi directional variants, use the rotate() function as needed
    • see the style.css of each method for a detailed example
  • Use with transparent colors (e.g. to overlay an image, or content) will require absolute or manual positioning:

Comparision Matrix

Method Simple CSS Generated Content Cross Browser Support Performance
Borders βœ” βœ” βœ” βœ–
CSS Shapes βœ– βœ– βœ– βœ–
Gradient Background Image βœ” βœ” βœ– βœ”
SVG Background Image ❓ βœ” βœ” βœ”
SVG Mask βœ– βœ– βœ– βœ–
CSS3 2D Transforms βœ– βœ– βœ– βœ–

Results

Releases

No releases published

Packages

No packages published