Skip to content
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

RTE: Classes for links #281

Closed
SventB opened this issue Jan 8, 2016 · 3 comments
Closed

RTE: Classes for links #281

SventB opened this issue Jan 8, 2016 · 3 comments

Comments

@SventB
Copy link
Contributor

SventB commented Jan 8, 2016

If I want a link in button style, e.g. style "Success", I have to select in selectbox "textstyle" first "Buttons: Base" and then "Buttons: Success", because only then the a-tag gets the correct classes ("btn btn-success").

This is a little bit complicated, isn't there a better solution for that? I've tried to accomplish this with TypoScript (lib.parseFunc_RTE.externalBlocks) but didn't succeed.

@SventB
Copy link
Contributor Author

SventB commented Jan 8, 2016

A working solution seems to be to extend the LESS styles a little bit:

.btn-success,
.btn-danger,
.btn-all-other-buttons {
    &:extend(.btn);
}

@SventB
Copy link
Contributor Author

SventB commented Jan 8, 2016

Or better this way, for correct hover effects:

.btn-default {
    .btn();
    .btn-default();
}
.btn-primary {
    .btn();
    .btn-primary();
}
.btn-success {
    .btn();
    .btn-success();
}
.btn-warning {
    .btn();
    .btn-warning();
}
.btn-danger {
    .btn();
    .btn-danger();
}

@cedricziel
Copy link
Contributor

Yep. The editor won't let you attach multiple classes at once. Same goes for detaching fyi.

Do you care to make a pull-request?

cedricziel added a commit that referenced this issue Jan 25, 2016
[TASK] RTE: Classes for links, see #281
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants