I implemented the triangle element. Instead of pure HTML and CSS, I use an SVG container for the element. This is a temporary solution.
I refactored the rectangle element module, using SVG similarly as for triangle.