Multiple bootstrap code is observed in Angular - css

I have an angular application, I am using Bootstrap classes. Whenever I am adding a new component like nav, button, etc. I am not able to see exact color and properties whatever I see in the bootstrap documentation, for eg: if I add a button HTML and added btn and btn-primary classes then I am not getting the exact color which is specified in bootstrap documentation:
Primary button in my application
Primary button from bootstrap documentation
In the inspect page I can see like this:
Inspect page for button
Could someone please help me on this

Related

How can a backdrop be added for any component using Angular Material?

I would like to add a backdrop to the page so that when a component on the page is in "edit mode", only that component is accessible to the user.
I know I can achieve this with a modal dialog, but I want the component to remain in its original position and darken/disable everything else on the page.
Is this possible using Angular Material? Maybe using the CDK?

Bootstrap dropdown alignment off after loading dropdown contents dynamically in Blazor

In Blazor, you can load content dynamically by putting it in an #if block and then making that condition true, e.g. on a button click.
I have a Bootstrap dropdown whose contents are loaded when the dropdown is first clicked. For some reason, the right alignment is not honored on the first click of the dropdown button but is on each subsequent click to open it. There is something about the initial render and the CSS not being honored. I am not sure why this is happening.
Here is an example (Blazor server-side): https://blazorfiddle.com/s/yc5m9rv4
Since Bootstrap dropdowns user popper.js, the solution was found through that. Bootstrap provides an update method to refresh the dropdown's position.
To solve this issue, the update method just needed to be called after the dropdown is rendered.
Here is an update, with this solution, to the example in the question: https://blazorfiddle.com/s/t24r1753

How add image button and navigate it by angular material

I want to make a button with including an (image on button) by angular material. as well as i want to link this button for a component what is relative to the button.
That's mean when i click the image as above mentioned, component should be visible on my project. then how i do this.

Can I prohibit summernote to inherit a CSS class?

I'm making a form using a purchased theme with bootstrap 3. The forms I like from the theme use a CSS class called ".smart-form *" which affects everything inside the form where it's being used. I'm also using Summernote inside the form and, as shown in the picture below, everything seems ok:
The problem comes when opening the image or link attachment modal window. Here's a picture of the class:
And here's a picture of how the modal looks:
Now, if I uncheck those 3 attributes from that class, I get a perfect modal window but the rest of the form gets broken. Here's the correct modal window:
Is there any way of telling Summernote NOT to inherit those 3 CSS attributes?
Thanks!!!

Missing Dropdown in Component Styles Tab in CQ5

In the TextImage component, the Style tab has lost the css selection dropdown that used to show up when editing the component. It now just shows a blank area. It should have a dropdown for image alignment (left or right are your choices). This doesn't appear anymore.
This tab is xtype componentstyles (String), so I don't know where it references the source for the dropdown values. My local instance of CQ5 works just fine.
I cannot just add an xtype selection and feed it values because the css that gets added to the JSP code is outside the component's .jsp-specific page
It looks like the componentstyles xtype is driven by the CQ design that is associated to the page. Designs are stored underneath /etc/designs and are assigned through a page's Page properties dialog (cq:designPath property)
Let's look at an example in the Geometrixx website. If you navigate to the English homepage # /content/geometrixx/en.html and add an instance of the TextImage component to the page, you will notice that the Styles tab is empty in the component dialog. Now navigate to the 'Discover Geometrixx' page # /geometrixx/en/company/discover_geometrixx.html and examine one of the two pre-existing instances of the TextImage component. The Styles tab has the image dropdown you mentioned!
So what is the difference between the instances on the 'Discover Page' and the 'Home' page? The answer is in the design definition. If you open up CRXDE Lite and navigate to the Geometrixx design page for the Content Page template (which the 'Discover Geometrixx' page adopts), you will see the following nodes:
/etc/designs/geometrixx/jcr:content/contentpage/par/textimage
/etc/designs/geometrixx/jcr:content/contentpage/par/textimage/cq:styles
/etc/designs/geometrixx/jcr:content/contentpage/par/textimage/cq:styles/imagealign
/etc/designs/geometrixx/jcr:content/contentpage/par/textimage/cq:styles/imagealign/image_left
/etc/designs/geometrixx/jcr:content/contentpage/par/textimage/cq:styles/imagealign/image_right
The design for the Homepage template (which the 'Home' page adopts) is missing this definition.
If you want to continue to use the out of box TextImage component, it seems you will need to have this design configuration set up on all the paragraph systems and templates where the component can go. So for example, if you want these styles to be available to the TextImage component when it is added to the par paragraph system of the Homepage template, you would add similar style nodes to:
/etc/designs/geometrixx/jcr:content/homepage/par/textimage/cq:styles
Alternatively you could just overlay the component and/or create your own. Then for this custom component you could create your own Styles dialog that is independent of the design. You can simulate the out of box behavior by examining the saved JCR property and setting the appropriate CSS class name in your render script.
The problem is that a design path variable went missing. We don't know why or how, but the solution is as follows.
Open up Content Repository
Go to /content/-sitefolder-/ and expand
Click on jcr:content and view properties
Check for attribute cq:designPath and its value
/etc/designs/-sitefolder-; add to properties if it doesn't exist

Resources