This is a migrated thread and some comments may be shown as answers.

margin between stacked notifications

6 Answers 513 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Morten
Top achievements
Rank 2
Iron
Iron
Iron
Morten asked on 10 Feb 2017, 05:31 AM

I'm trying to add a little margin between stacked notifications to visually better separate individual notifications, however, I can't get the css right.

All demo's of stacked notifications has zero margin.

Do you have any suggestions?

6 Answers, 1 is accepted

Sort by
0
Patrick | Technical Support Engineer, Senior
Telerik team
answered on 10 Feb 2017, 09:07 PM
Hello Morten,

One way to separate notifications would be this:
div.k-animation-container{
  padding-bottom: 5px; 
}

You can see this approach in this Kendo UI Dojo by Progress.

Hope this helps!

Regards,
Patrick
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Morten
Top achievements
Rank 2
Iron
Iron
Iron
answered on 11 Feb 2017, 06:08 AM

Hi Patrick,

I would like to set the padding in my global stylesheet and only affect notifications.

Do you know if the generally looking css class "k-animation-container" is used with any other widget in the kendo ui framework?

/Morten

0
Patrick | Technical Support Engineer, Senior
Telerik team
answered on 13 Feb 2017, 06:46 PM
Hello Morten,

Please take a look at this documentation pertaining to the HTML Output of the notification.  .k-animation-container is used for the Kendo UI popups.  

I hope this clears things.

Regards,
Patrick
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Morten
Top achievements
Rank 2
Iron
Iron
Iron
answered on 25 Mar 2017, 08:13 AM

Hello Patrick

thanks for your answer.

The documentations says "... k-animation-container, which is an element that wraps every Kendo UI popup...."

Do you have an overview of what Kendo UI widgets are using "k-animation-container"?

If I set some extra styling on "k-animation-container" I would like only the notifications to be affected.

Thanks in advance.

/Morten

0
Veselin Tsvetanov
Telerik team
answered on 29 Mar 2017, 07:36 AM
Hi Morten,

The k-animation-container class is used in most of the Kendo widgets. In is present in all drop-downs and also in all complex widgets, that contain drop-downs. Therefore, using that class for applying custom styles on the Notification may cause considerable styling issues.

What I would recommend you to use instead is the custom class, that is appended to the <div> element of each Notification widget . You could get that class name from the instance of the widget:
var customClass = centered._guid;

The following Dojo demonstrates how to get the above class and inject a style rule, that would affect only that Notification widget element.

Regards,
Veselin Tsvetanov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Morten
Top achievements
Rank 2
Iron
Iron
Iron
answered on 30 Aug 2018, 09:26 PM

for reference I ended up with the following:

        show: function() {
            var $notifications = $(".my-notification").closest(".k-animation-container");
            $.each($notifications, function() {
                $(this).css({ "margin-top": "2px" });
            });
        }


Tags
Notification
Asked by
Morten
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Patrick | Technical Support Engineer, Senior
Telerik team
Morten
Top achievements
Rank 2
Iron
Iron
Iron
Veselin Tsvetanov
Telerik team
Share this question
or