-
Notifications
You must be signed in to change notification settings - Fork 20
feat(mistica-css): GridLayout #1355
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
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
307cd82
WEB-2192 Mistica Column Layout
davidvdshop 4e44c9e
Fix remove spaces
davidvdshop fc6c32e
Merge branch 'master' of https://github.com/Telefonica/mistica-web in…
davidvdshop c785f09
Remove js, change classes and create svg
davidvdshop 1bffd03
added gap on small desktop screen
davidvdshop 8e4d6fc
resolve conflicts
davidvdshop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -939,6 +939,62 @@ button.mistica-display-card:has(.mistica-card__media):active:after { | |
| height: auto; | ||
| } | ||
|
|
||
| /* Grid Layout */ | ||
|
|
||
| .mistica-grid-layout { | ||
| display: grid; | ||
| grid-template-columns: repeat(12, 1fr); | ||
| gap: 24px; | ||
| } | ||
|
|
||
| @media (max-width: 1023px) { | ||
| .mistica-grid-layout { | ||
| grid-template-columns: minmax(0, 1fr); | ||
| } | ||
|
|
||
| .mistica-grid-layout [class^="mistica-col-"] { | ||
| grid-column: span 1; | ||
| } | ||
|
|
||
| .mistica-col-1 { | ||
| display: none; | ||
| } | ||
| } | ||
|
|
||
| @media (min-width: 1024px) and (max-width: 1367px) { | ||
| .mistica-grid-layout { | ||
| grid-column-gap: 16px; | ||
| } | ||
| } | ||
|
|
||
| .mistica-col-1 { | ||
| grid-column: span 1; | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there is an extra space here. Please check your editor prettier setup |
||
|
|
||
| .mistica-col-3 { | ||
| grid-column: span 3; | ||
| } | ||
|
|
||
| .mistica-col-4 { | ||
| grid-column: span 4; | ||
| } | ||
|
|
||
| .mistica-col-5 { | ||
| grid-column: span 5; | ||
| } | ||
|
|
||
| .mistica-col-6 { | ||
| grid-column: span 6; | ||
| } | ||
|
|
||
| .mistica-col-8 { | ||
| grid-column: span 8; | ||
| } | ||
|
|
||
| .mistica-col-9 { | ||
| grid-column: span 9; | ||
| } | ||
|
|
||
| /* Table */ | ||
| .mistica-table { | ||
| border-collapse: separate; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -601,8 +601,107 @@ <h2 class="mistica-card__title">Title</h2> | |
| </a> | ||
| </div> | ||
| </div> | ||
|
|
||
| <h3 class="mistica-text-title2">Grid Layout</h3> | ||
| <h4 class="mistica-text-title1">6 + 6</h4> | ||
| <section class="mistica-grid-layout" id="mistica-grid"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove the id |
||
| <div class="mistica-col-6"> | ||
| <div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;"> | ||
| <svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none"> | ||
| <use href="#mistica-grid-svg"></use> | ||
| </svg> | ||
| </div> | ||
| </div> | ||
| <div class="mistica-col-6"> | ||
| <div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;"> | ||
| <svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none"> | ||
| <use href="#mistica-grid-svg"></use> | ||
| </svg> | ||
| </div> | ||
| </div> | ||
| </section> | ||
| <h4 class="mistica-text-title1">5 + 4</h4> | ||
| <section class="mistica-grid-layout" id="mistica-grid"> | ||
| <div class="mistica-col-1"></div> | ||
| <div class="mistica-col-5"> | ||
| <div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;"> | ||
| <svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none"> | ||
| <use href="#mistica-grid-svg"></use> | ||
| </svg> | ||
| </div> | ||
| </div> | ||
| <div class="mistica-col-1"></div> | ||
| <div class="mistica-col-4"> | ||
| <div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;"> | ||
| <svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none"> | ||
| <use href="#mistica-grid-svg"></use> | ||
| </svg> | ||
| </div> | ||
| </div> | ||
| <div class="mistica-col-1"></div> | ||
| </section> | ||
| <h4 class="mistica-text-title1">4 + 6</h4> | ||
| <section class="mistica-grid-layout" id="mistica-grid"> | ||
| <div class="mistica-col-1"></div> | ||
| <div class="mistica-col-4"> | ||
| <div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;"> | ||
| <svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none"> | ||
| <use href="#mistica-grid-svg"></use> | ||
| </svg> | ||
| </div> | ||
| </div> | ||
| <div class="mistica-col-6"> | ||
| <div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;"> | ||
| <svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none"> | ||
| <use href="#mistica-grid-svg"></use> | ||
| </svg> | ||
| </div> | ||
| </div> | ||
| <div class="mistica-col-1"></div> | ||
| </section> | ||
| <h4 class="mistica-text-title1">8 + 4</h4> | ||
| <section class="mistica-grid-layout" id="mistica-grid"> | ||
| <div class="mistica-col-8"> | ||
| <div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;"> | ||
| <svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none"> | ||
| <use href="#mistica-grid-svg"></use> | ||
| </svg> | ||
| </div> | ||
| </div> | ||
| <div class="mistica-col-4"> | ||
| <div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;"> | ||
| <svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none"> | ||
| <use href="#mistica-grid-svg"></use> | ||
| </svg> | ||
| </div> | ||
| </div> | ||
| </section> | ||
| <h4 class="mistica-text-title1">3 + 9</h4> | ||
| <section class="mistica-grid-layout" id="mistica-grid"> | ||
| <div class="mistica-col-3"> | ||
| <div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;"> | ||
| <svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none"> | ||
| <use href="#mistica-grid-svg"></use> | ||
| </svg> | ||
| </div> | ||
| </div> | ||
| <div class="mistica-col-9"> | ||
| <div style="height: 120px; width: auto; box-sizing: border-box; background: rgba(11, 39, 57, 0.08); border: 2px solid rgba(11, 39, 57, 0.3); position: relative;"> | ||
| <svg width="100%" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none"> | ||
| <use href="#mistica-grid-svg"></use> | ||
| </svg> | ||
| </div> | ||
| </div> | ||
| </section> | ||
| </div> | ||
| </div> | ||
| <script type="module" src="/main.js"></script> | ||
| </body> | ||
|
|
||
| <svg style="display: none;"> | ||
| <symbol id="mistica-grid-svg"> | ||
| <line x1="0" y1="0" x2="100" y2="100" style="stroke-width: 2; stroke: rgba(11, 39, 57, 0.1);" /> | ||
| <line x1="100" y1="0" x2="0" y2="100" style="stroke-width: 2; stroke: rgba(11, 39, 57, 0.1);" /> | ||
| </symbol> | ||
| </svg> | ||
| </html> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.