I use nativescript-vue.
Could help me. Button attributes: backgroundSize, backgroudRepeat, backgroundSize don't work
<Button
backgroundRepeat="no-repeat"
backgroundSize="contain"
backgroundPosition="center"
/>
reproduce bug playground
But if you set them through a class or style attribute, then it works.
Thank's
backgroundSize, backgroudRepeat and backgroundSize are not the button attributes. If you check the Button class, only background, backgroundColor and backgroundImage are available as properties.
You can set them using CSS only.
Related
I want normal cancel functionality on cancel button click of sfdatepicker footer, I am trying to achieve it by binding command but it is not working. Could any one suggest me any solution for that ?
You can use code like below:
<datePicker:SfDatePicker.FooterView>
<Grid>
<Button Text="Ok"
x:Name="footerViewButton"
Clicked="footerViewButton_Clicked"/>
</Grid>
</datePicker:SfDatePicker.FooterView>
Created in this way, and then create the corresponding method in the ViewModel to achieve logical operations.
I'm a graphic designer who has to customize a project done with strapi - and I am sooo lost. I managed to change backgroundcolors, backgroundimages so far - no problem. BUT: I am totally unable to customize the elements like the primary buttons.
I found lots of class definitions ".primary", changed them - without a result ... in the end I removed them all ... but the primary buttons stills look the same. How? Why?
The only why to get rid of the visual appearance of the primary button, was by removing (e.g. of the login page -> within the index.js under admin/src/containers/AuthPage) "primary" of the buttons declaration.
<Button primary label="users-permissions.Auth.form.button.login" type="submit" />
But that's not what I wanted. I want to customize e.g. the primary buttons. Not getting rid of it.
I searched stackoverflow for strapi customization or ui issues but couldn't find a solution. I found a lot of strategies of overriding bootstrap CSS, e.g.:
How can I override Bootstrap CSS styles?
But strapis SCSS seems to something different I obviously don't understand yet.
If anyone has an idea or did already overrides to e.g. primary button - please let me know.
Thanks in advance, Stef.
You have two ways to override the default style of a button
You can pass a style prop to the component
<Button label="Label" type="button" style={{ background: 'red' }} />
You can pass a custom className prop:
In order to do so, you need to add the class in your 'plugins/users-permissions/admin/src/containers/Auth/styles.scss` file (where the component is going to be used)
.customButton {
background: red;
}
Then in your index.js file
import Button from 'components/Button';
import styles from './styles.scss';
render() {
return (
<Button label="label" className={styles.customButton} />
);
}
IE 'contenteditable' implemntation is not allowing me to change the cursor property when ever the contenteditable property in CKEditor is set to 'true'(no issue if the contenteditable='false').
Not an issue in chrome in both cases whether the contenteditable is set to true/false.
tried to change it dynamically using the following code but was not successful
var element = $('iframe').contents().find('body.cke_show_borders').get(0);
var elem = CKEDITOR.dom.element.get( element );
elem.setStyle('cursor', 'pointer');
any idea to handle this please?
Thanks.
It is browser native bug.
You can reproduce this issue outside of CKEDITOR with following code:
<body style="cursor:pointer" contenteditable="true">
</body>
I doubt there are any workarounds for this.
According to the documentation it is possible to:
In the XML markup, add the if attribute to an element and assign it to the property passed to the createController() method. Prefix the property name with the $.args namespace. Based on the property passed to the method, the application displays a different label.
So this means that if I put:
<Label if="Alloy.Globals.property" color="blue">Foobar</Label
Wont work?? Right now I´m not using the createController method, because it is added on the XML by a Require tag. Is there any way to do this?
As you can see in the docs there are some examples.
One of which:
<Alloy>
<Window>
<Label if="$.args.fooBar" color="blue">Foobar</Label>
<Label if="$.args.fooBaz" color="red">Foobaz</Label>
</Window>
</Alloy>
So yes, this will just work. As long as the property you provide is already set when rendering. Once your variable changes while the view is open it won't update it. For that you'll need data binding
We achieve this behaviour in android using a TextView with the property autoLink set to web.
<TextView android:autoLink="web" ... />
How to do that in NS?
If you would like to have clickable links, you can use HtmlView instead of TextView. The thing is that instead of click, you will have to use long press.