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

Set the size when component inside #11

Open
mrjohnr opened this issue Apr 28, 2018 · 3 comments
Open

Set the size when component inside #11

mrjohnr opened this issue Apr 28, 2018 · 3 comments
Labels

Comments

@mrjohnr
Copy link

mrjohnr commented Apr 28, 2018

Hi.it is possible to set the size when have component inside,for example I want to use it for edit data (large size) or for simple dialogs (small size)?
I want to put inline form inside:

<form class="form-inline" action="/action_page.php">
    <label for="email">Email address:</label>
    <input type="email" class="form-control" id="email">
    <label for="pwd">Password:</label>
    <input type="password" class="form-control" id="pwd">
    <div class="form-check">
        <label class="form-check-label">
            <input class="form-check-input" type="checkbox"> Remember me
        </label>
    </div>
    <button type="submit" class="btn btn-primary">Submit</button>
</form>

for me it looks very small : https://i.imgur.com/RNlDrpb.png
thanks

@zurfyx
Copy link
Owner

zurfyx commented May 2, 2018

Hey @mrjohnr

You can set the modal size to whatever you want. Otherwise it'll be the content inside it the one deciding over the minimum width and height.

For example, I have a medium-sized modal with the following style:

.modal-dialog {
  width: 80%;
  max-width: 750px;
  height: 80%;
}

@zurfyx zurfyx added the question label May 2, 2018
@mrjohnr
Copy link
Author

mrjohnr commented May 3, 2018

thanks.for the modal it seems that css works only when it is put in general syle.css
it would be fine to can be configured inside current component
thanks

@zurfyx
Copy link
Owner

zurfyx commented May 4, 2018

Ah, that's probably because Angular by default generates CSS that targets only that component (i.e. .some-class[_ngcontent-c18]). Hence, it will not match if the modal component is its parent.

You have to prefix it with /deep/ if you want it to match the global scope.

/deep/ .modal-dialog { ... }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants