-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "Open in Codepen" to link example #1693
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will you be adding the Open in CodePen button in a different PR?
Whoops! Added @carmacleod :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Thanks @spectranaut !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spectranaut just one question.
Btw, thank you for all this awesome work on the images so they work in codepen.
@@ -55,6 +55,12 @@ table.data.attributes tbody td { | |||
hyphens: manual; | |||
} | |||
|
|||
/* We need to override the top margin for the link example */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have to make a change for a specific example in the core.css?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the other examples follow the same layout -- there is a header which describes the example. If there is just on example, it says "Example". If there are multiple examples on the page, there is a header for each example (something like: "Example 1: Simple List of Links"). The open in codepen button is added automatically as a sibling element to this header.
In the case of the links, though, the three examples are in a table. So the styling has to be slightly different to look good.. I'm not sure another place to put it, I could put it in the link example pages css but that css is ONLY for the example itself not the surrounding page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spectranaut wrote:
All of the other examples follow the same layout -- there is a header which describes the example. If there is just on example, it says "Example". If there are multiple examples on the page, there is a header for each example (something like: "Example 1: Simple List of Links"). The open in codepen button is added automatically as a sibling element to this header.
In the case of the links, though, the three examples are in a table. So the styling has to be slightly different to look good..
Oh, I didn't realize the styling was that different. Link was one of the very early examples. And, due to its simplicity, it has had almost no attention over the years.
I'm not sure another place to put it, I could put it in the link example pages css but that css is ONLY for the example itself not the surrounding page.
It makes sense to be in core. We might want to revisit the page design. That is likely to happen naturally as part of the redesign project, so I guess we don't need a separate issue for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcking65 @spectranaut
Another possibility is to put the whole table with all 3 link examples into a single codepen instead of having 3 separate codepens.
In order to add the "Open in Codepen" button to this example, I did the following:
Preview