Giter Club home page Giter Club logo

Comments (8)

donni106 avatar donni106 commented on August 23, 2024 12

The marginBottom: 10 for list items is in line 101 now: https://github.com/archriss/react-native-render-html/blob/master/src/HTMLRenderers.js#L101

Will there be a prop in some future version, or do we need to create a custom renderer to change the margin?

from react-native-render-html.

systemride avatar systemride commented on August 23, 2024 2

This should still be open, there's still no way to override the li element styles.

from react-native-render-html.

jsamr avatar jsamr commented on August 23, 2024 2

@systemride You should be able to set margins for lists in the foundry pre-release, see #430 for instructions on how to try it out.

from react-native-render-html.

AlexCatch avatar AlexCatch commented on August 23, 2024 1

This doesn't seem to be fixed, passing a style with margin inside seems to have no effect.

from react-native-render-html.

mitchdowney avatar mitchdowney commented on August 23, 2024 1

@pataar maybe I'll regret this, but a hacky workaround that seems to work for me is to set marginLeft: -16 on the ul custom tag style.

ul: {
  listStyleType: 'none',
  marginBottom: 0,
  marginLeft: -16,
  marginRight: 0,
  marginTop: 0,
  paddingLeft: 0
},
li: {
  listStyleType: 'none'
}

from react-native-render-html.

Exilz avatar Exilz commented on August 23, 2024

Hi, you're correct, there is no simple way to change these styles for now.

Maybe we could add a style prop that would be merged with all the default styles for the renderers supplied with the plugin. I don't want to create too much additional props to tweak styling here and there. I feel like there's too much props already.

In the meantime, you can just copy/paste the renderer and change these values however you see fit and add your custom renderer to your renderers prop.

from react-native-render-html.

Exilz avatar Exilz commented on August 23, 2024

This should be fixed in 3.6.0.

from react-native-render-html.

pataar avatar pataar commented on August 23, 2024

Any solution for this?

from react-native-render-html.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.