canonical / vanilla-framework

From community websites to web applications, this CSS framework will help you achieve a consistent look and feel.
https://vanillaframework.io
GNU Lesser General Public License v3.0
830 stars 165 forks source link

CTA Block component #5196

Closed jmuzina closed 2 months ago

jmuzina commented 3 months ago

Done

Creates CTA block component. This will be used in many of our future "higher order components". The need for a separately styled CTA block component arose from this comment in the Hero PR and MM message.

See Figma

QA

Check if PR is ready for release

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

Screenshots

image

webteam-app commented 3 months ago

Demo

Jenkins

demos.haus

bartaz commented 3 months ago

We have it in such cases as well, in 25/75: https://vanillaframework.io/docs/examples/patterns/hero/hero-rules https://vanillaframework.io/docs/examples/patterns/hero/hero-signpost

And the top line does not span the whole width here:

image image

To me, this kind of placement in the center is odd, and should be an exception, not the default:

image
bartaz commented 3 months ago

As discussed with @lyubomir-popov, lets for now implement it as the most common use case that is used in hero and other places, so a simple component with button, link and a line on top. No layout within. Just making sure it wraps as needed.

image
jmuzina commented 3 months ago

Should this be a "component" or a "pattern"?

bartaz commented 3 months ago

It fits more as a component that we use inside bigger patterns.

bartaz commented 2 months ago

We are holding off on merging this, as we are experimenting with implementing patterns in CSS which may mean this component is not really needed on it's own.

jmuzina commented 2 months ago

Rebased and made a change to remove the __link class from the link inside the example, since the flex implementation doesn't require the link to have its own class.