CSS shapes in RSD? - Post ID 257172

User 2800971 Photo


Registered User
15 posts

Hi guys,

I would like to use some CSS shapes in RSD like these: https://css-tricks.com/examples/ShapesOfCSS/

Now, I can hand-code the CSS and HTML after exporting but that is laborious and unless I link in additional CSS and HTML files, my changes get overwritten whenever I export.

Is there a way of creating CSS shapes in RSD?
User 379556 Photo


Registered User
1,583 posts

One could adapt within an HTML Element the code used in the website mentioned.

For example, for an oval, the website showed -
#oval { width: 200px; height: 100px; background: red; -moz-border-radius: 100px / 50px; -webkit-border-radius: 100px / 50px; border-radius: 100px / 50px; }


From the Elements panel I dragged an HTML Element into a column, and in the Design section I entered the following in the HTML box -
<div style="width: 200px; height: 100px; background: red; -moz-border-radius: 100px / 50px; -webkit-border-radius: 100px / 50px; border-radius: 100px / 50px;"></div>


Frank
User 2800971 Photo


Registered User
15 posts

Thanks Frank.

I ended up adding a link in the header to a shapes.css file and using the ID of each shape for the column I want a certain shape to go in. I was hoping there was an easier way because I'm lazy :)

David.
User 434929 Photo


Ambassador
938 posts

Some of basic shapes it very easy to build within RSD such as Square, Rectangle, Circle, Oval, Diamond Square and etc.

Just simply drag a container and set it's width and height plus border properties to create the desire shape.

and lovely thing with latest flex property you can add element into it and center it vertically and horizontally.
Guys at coffeecup are awesometacular.
User 434929 Photo


Ambassador
938 posts

I give you some example ( All Basic CSS shapes made with RSD v1.2)

Download the attachment and study
Attachments:
Guys at coffeecup are awesometacular.
User 2800971 Photo


Registered User
15 posts

Mansour ... wrote:
I give you some example ( All Basic CSS shapes made with RSD v1.2)

Download the attachment and study


This is exactly what I was after, thank you. I was reproducing tangram shapes which I did manually in CSS. Your RSD file would have saved me a lot of time! I shall have a close look at it and steal mercilessly!

Thanks again,

David.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.