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

Feature: CSS Selector, now with IE Compatibility mode! #79

Closed
wants to merge 4 commits into from

Conversation

wlvstv
Copy link
Contributor

@wlvstv wlvstv commented Oct 5, 2019

Purpose

This feature request is proposed to solve a couple issues:

  1. Solves IE Implementation? #40 , CSS Generation for IE
  2. Adds features that resolve some discussion on Proposal: CSS nesting changes. #76 namely, the debate over showing vanilla CSS vs. SCSS syntax. We can now have our 🍰 and eat it too!

I would really love for someone who is much more of an expert on ms-grid to take a look at my css outputs and validate they are the way these should be implemented :).

Change Summary

  • Added a Dropdown and data object control to select the CSS output type, CSS (Default), SCSS or IE Compatible.
  • Added v-if conditions to change display for SCSS nesting of child components.
  • Added IE Compatible CSS generation and accompanying conditional elements
  • Added methods to compute ms-grid span and margin values
  • Modified Vuex to add state objects for ms grid templates and modified mutations to populate the objects
  • Modified grid component to pass grid values as an object into vuex for manipulation into ms-grid

Notes

I was trying to get creative with formatting to save screen real estate, very open to suggestions on how to pretty this up. I also took liberties with the styling for the dropdown menu for CSS selection. Please let me know how we can make these look better!

Examples

Here is an example of what the changes look like. Here is the example grid:
startinggrid

Vanilla CSS:
cssgridcss

SCSS:
cssgridscss

IE Compatibility:
cssgridie

…lement for cssType and defaulted to vanilla CSS.
Adding an ms col/row template to be able to calculate based on individual start and end values to make spans work in ms.
Modified mutations to push into ms state objects and create the child grid-areas.
To calculate the ms grid spans and values for IE, I needed to grab the start and end values as an object in lieu of stripping the string.
Added a dropdown to select CSS styles, default is vanilla CSS.
You can also select SCSS (allows nested children) and IE compatibility mode.
Added the CSS changes required for ms grid, the IE compatible implementation of css grid
@sdras
Copy link
Owner

sdras commented Oct 6, 2019

Thanks for the PR! I'd be willling to take a PR for IE support but don't want a lang preprocessor switcher for CSS, I'm trying to keep the tool simple. We've already made it acceptable for CSS. I'm going to close this out, feel free to resubmit with a smaller PR that just addresses IE.

@sdras sdras closed this Oct 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants